- respect the user's mod-wide "enabled" setting when changing profiles (ticket #117)

- also cleaned up some logic that could cause errors when enabling the mod due to a profile switch when the player initially loaded with it disabled
This commit is contained in:
Parnic
2011-01-26 01:05:04 +00:00
parent 0112d98761
commit fd7d8db005
4 changed files with 22 additions and 7 deletions

View File

@ -245,12 +245,12 @@ function IceHUD:OnEnable(isFirst)
if self.db.profile.enable then
self.IceCore:Enable()
end
-- Add dual-spec support
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
if LibDualSpec then
LibDualSpec:EnhanceDatabase(self.db, "IceHUD")
end
-- Add dual-spec support
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
if LibDualSpec then
LibDualSpec:EnhanceDatabase(self.db, "IceHUD")
end
--@debug@
@ -443,7 +443,9 @@ end
function IceHUD:PostProfileChanged(db, newProfile)
self:NotifyNewDb()
self.IceCore:Enable()
if self.db.profile.enable then
self.IceCore:Enable()
end
end
function IceHUD:ProfileReset()