- fixed bars disappearing when they were set to reverse and they filled up

- also fixed an issue where deleting a custom cooldown bar while it was set to "always" display would cause it to get stuck on the screen until the next UI reload
This commit is contained in:
Parnic
2010-07-24 18:40:35 +00:00
parent 54476799a4
commit 12093a32fa
2 changed files with 15 additions and 11 deletions

View File

@ -793,11 +793,11 @@ function IceBarElement.prototype:Flip(side)
end
function IceBarElement.prototype:SetScale(scale, force)
function IceBarElement.prototype:SetScale(inScale, force)
local oldScale = self.CurrScale
local min_y, max_y;
self.CurrScale = IceHUD:Clamp(self:LerpScale(scale), 0, 1)
self.CurrScale = IceHUD:Clamp(self:LerpScale(inScale), 0, 1)
if force or oldScale ~= self.CurrScale then
local scale = self.CurrScale
@ -819,7 +819,7 @@ function IceBarElement.prototype:SetScale(scale, force)
self.barFrame:SetHeight(self.settings.barHeight * scale)
if self.CurrScale == 0 then
if scale == 0 then
self.barFrame.bar:Hide()
else
self.barFrame.bar:Show()