- made custom (de)buff watcher bars respect the bForceHide option for :Show() so that they are properly hidden when a profile change occurs or they are manually disabled via the options menu

This commit is contained in:
Parnic
2011-04-26 02:41:48 +00:00
parent 095d6f2519
commit c178051c85
2 changed files with 8 additions and 9 deletions

View File

@ -446,7 +446,7 @@ function IceCore.prototype:Disable(userToggle)
self:ConfigModeToggle(false)
for i = 1, table.getn(self.elements) do
for i=1, #self.elements do
if (self.elements[i]:IsEnabled()) then
self.elements[i]:Disable(true)
end

View File

@ -89,12 +89,6 @@ function IceCustomBar.prototype:TargetChanged()
self:UpdateCustomBar(self.unit)
end
function IceCustomBar.prototype:Disable(core)
IceHUD.IceCore:RequestUpdates(self, nil)
IceCustomBar.super.prototype.Disable(self, core)
end
-- OVERRIDE
function IceCustomBar.prototype:GetDefaultSettings()
local settings = IceCustomBar.super.prototype.GetDefaultSettings(self)
@ -749,7 +743,12 @@ function IceCustomBar.prototype:OutCombat()
self:UpdateCustomBar(self.unit)
end
function IceCustomBar.prototype:Show(bShouldShow)
function IceCustomBar.prototype:Show(bShouldShow, bForceHide)
if bForceHide then
IceCustomBar.super.prototype.Show(self, bShouldShow, bForceHide)
return
end
if self.moduleSettings.displayWhenTargeting and self.target then
IceCustomBar.super.prototype.Show(self, true)
elseif self.moduleSettings.displayWhenEmpty then