From 7d89941039460ea4f6028c3fd368ec04b0355c6f Mon Sep 17 00:00:00 2001 From: michaelsp Date: Wed, 6 Nov 2024 19:28:33 +0100 Subject: [PATCH] Fixing bug in child bars when using multiple profiles (CF issue #1319) Removed workaround to this already fixed blizzard bug (https://github.com/Stanzilla/WoWUIBugs/issues/498) --- modules/IndicatorBar.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/IndicatorBar.lua b/modules/IndicatorBar.lua index 7189679b..ba74a337 100644 --- a/modules/IndicatorBar.lua +++ b/modules/IndicatorBar.lua @@ -79,17 +79,12 @@ local function Bar_SetValue(self, parent, value) parent[self.name]:SetValue(value) end --- workaround to fix a bug in statusbar (https://github.com/Stanzilla/WoWUIBugs/issues/498) -local function Bar_SetValueBg(self, parent, value) - parent[self.name]:SetValue(value==0 and 0.00001 or value) -end - local function Bar_SetValueParent(self, parent, value) - parent[self.name]:SetValue(value==0 and 0.00001 or value) -- workaround to statusbar bug + parent[self.name]:SetValue(value) local barChild = parent[self.childName] local childValue = barChild.realValue or 0 if childValue>0 then - barChild:SetValue( value+childValue>1 and 1-value or childValue) + barChild:SetValue(value+childValue>1 and 1-value or childValue) end end @@ -249,7 +244,7 @@ local function Bar_UpdateDB(self) self.reverseFill = barParent.reverseFill self.orientation = barParent.orientation else - self.SetValue = dbx.backColor and Bar_SetValueBg or Bar_SetValue + self.SetValue = self.childName and Bar_SetValueParent or Bar_SetValue self.CanCreate = self.prototype.CanCreate self.parentName = nil if self.childName then -- fix changing orientation on themes, CF issue #1227