Fix alot of bugs with switching profiles
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
||||
|
||||
-- register module
|
||||
local XPBarMod = Bartender4:NewModule("RepXPBar")
|
||||
|
||||
-- create prototype information
|
||||
local XPBar = setmetatable({}, {__index = Bar})
|
||||
|
||||
-- fetch upvalues
|
||||
local Bar = Bartender4.Bar.prototype
|
||||
|
||||
|
||||
|
||||
local table_insert = table.insert
|
||||
|
||||
local defaults = { profile = Bartender4:Merge({
|
||||
@@ -47,12 +39,6 @@ function RepBarMod:OnEnable()
|
||||
self.bar:ApplyConfig(self.db.profile)
|
||||
end
|
||||
|
||||
function RepBarMod:OnDisable()
|
||||
if not self.bar then return end
|
||||
self.bar:Disable()
|
||||
self:ToggleOptions()
|
||||
end
|
||||
|
||||
function RepBarMod:ApplyConfig()
|
||||
self.bar:ApplyConfig(self.db.profile)
|
||||
end
|
||||
@@ -97,7 +83,6 @@ function XPBarMod:OnEnable()
|
||||
self.bar:ApplyConfig(self.db.profile)
|
||||
end
|
||||
|
||||
XPBarMod.OnDisable = RepBarMod.OnDisable
|
||||
XPBarMod.ApplyConfig = RepBarMod.ApplyConfig
|
||||
XPBar.ApplyConfig = RepBar.ApplyConfig
|
||||
XPBar.PerformLayout = RepBar.PerformLayout
|
||||
|
||||
Reference in New Issue
Block a user