From 74b9ace21d38c4dea11d9115c84bf153fff5b15f Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 6 Nov 2010 02:31:35 +0000 Subject: [PATCH] - better fix for cast bars getting stuck sometimes - reinstated the code that was shutting off updates when a bar reached its desired scale --- IceBarElement.lua | 14 +------------- IceCastBar.lua | 9 +++++++++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/IceBarElement.lua b/IceBarElement.lua index 1a80a58..fe99acc 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -1186,9 +1186,7 @@ function IceBarElement.prototype:SetScale(inScale, force) self:ConditionalSetupUpdate() else if self.CurrScale == self.DesiredScale then - -- Parnic: this optimization may be reaching a bit too far and causing things to get stuck - -- without this, several modules continues to update that don't need to but the stuck issues seem to be decreased - --IceHUD.IceCore:RequestUpdates(self, nil) + IceHUD.IceCore:RequestUpdates(self, nil) end end end @@ -1558,13 +1556,3 @@ function IceBarElement.prototype:LoadMarkers() self:CreateMarker(i) end end - -function IceBarElement.prototype:Show(bShouldShow) - if IceBarElement.super.prototype.Show(self, bShouldShow) then - if self.bIsVisible then - self:ConditionalSetupUpdate() - else - IceHUD.IceCore:RequestUpdates(self, nil) - end - end -end diff --git a/IceCastBar.lua b/IceCastBar.lua index 0336e7c..08198eb 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -211,6 +211,15 @@ function IceCastBar.prototype:GetOptions() return opts end +function IceCastBar.prototype:IsFull(scale) + local retval = IceCastBar.super.prototype.IsFull(self, scale) + if retval then + if self.action and self.action ~= IceCastBar.Actions.None then + return false + end + end + return retval +end -- 'Protected' methods --------------------------------------------------------