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 -6
View File
@@ -30,9 +30,6 @@ function RepBarMod:OnEnable()
self.bar.content:SetParent(self.bar)
self.bar.content:Show()
self.bar.content:SetFrameLevel(self.bar:GetFrameLevel() + 1)
-- TODO: real start position
self.bar:SetPoint("CENTER")
end
self.bar:Enable()
self:ToggleOptions()
@@ -45,6 +42,12 @@ end
function RepBar:ApplyConfig(config)
Bar.ApplyConfig(self, config)
if not self.config.position then
self:ClearSetPoint("CENTER")
self:SavePosition()
end
self:PerformLayout()
end
@@ -74,9 +77,6 @@ function XPBarMod:OnEnable()
self.bar.content:SetParent(self.bar)
self.bar.content:Show()
self.bar.content:SetFrameLevel(self.bar:GetFrameLevel() + 1)
-- TODO: real start position
self.bar:SetPoint("CENTER")
end
self.bar:Enable()
self:ToggleOptions()