From fa74303411e937696d8970a382e7e3ab11d15b2d Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 30 Oct 2010 15:48:54 +0000 Subject: [PATCH] - better fix to make sure modules always re-register for updates if they need to when they're shown --- IceBarElement.lua | 3 +++ IceCastBar.lua | 3 --- modules/PlayerMana.lua | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/IceBarElement.lua b/IceBarElement.lua index c80ca8b..46af884 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -111,6 +111,9 @@ function IceBarElement.prototype:OnHide() end function IceBarElement.prototype:OnShow() + if not self:IsFull(self.CurrScale) then + self:ConditionalSetupUpdate() + end end function IceBarElement.prototype:Disable(core) diff --git a/IceCastBar.lua b/IceCastBar.lua index 41953c6..e92653a 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -400,9 +400,6 @@ function IceCastBar.prototype:GetShortRank(rank) return "" end -function IceCastBar.prototype:OnShow() - self:ConditionalSetupUpdate() -end ------------------------------------------------------------------------------- diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index 8247d95..477f498 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -152,6 +152,11 @@ function PlayerMana.prototype:SetupOnUpdate(enable) end end +function PlayerMana.prototype:OnShow() + if not self:IsFull(self.CurrScale) then + self:SetupOnUpdate(true) + end +end function PlayerMana.prototype:EnteringVehicle(event, unit, arg2) if (self.unit == "player" and IceHUD:ShouldSwapToVehicle(unit, arg2)) then