Fixed issues with position saving and reseting profiles

This commit is contained in:
Hendrik Leppkes
2008-11-11 16:13:49 +01:00
parent 7f57e78c61
commit 90c58593b9
8 changed files with 42 additions and 19 deletions
+6 -5
View File
@@ -33,12 +33,7 @@ function PetBarMod:OnEnable()
end
self.bar.buttons = buttons
-- TODO: real positioning
self.bar:ClearSetPoint("CENTER", 0, 70)
self.bar:SetScript("OnEvent", PetBar.OnEvent)
--self.bar:SetAttribute("unit", "pet")
end
self.bar:Enable()
@@ -99,6 +94,12 @@ end
function PetBar:ApplyConfig(config)
ButtonBar.ApplyConfig(self, config)
if not self.config.position then
self:ClearSetPoint("CENTER", 0, 70)
self:SavePosition()
end
self:UpdateButtonLayout()
self:ForAll("Update")
self:ForAll("ApplyStyle", self.config.style)