Commit 34d3fa04 authored by Simpy's avatar Simpy 🐹

Hotfix: StanceBar showing when it's supposed to be disabled

parents 0e14b782 73742051
......@@ -270,16 +270,17 @@ function AB:PositionAndSizeBarShapeShift()
end
end
if useMasque then MasqueGroup:ReSkin() end
if useMasque then
MasqueGroup:ReSkin()
end
numButtons = GetNumShapeshiftForms()
if self.db.stanceBar.enabled then
local visibility = self.db.stanceBar.visibility
if visibility and visibility:match('[\n\r]') then
visibility = visibility:gsub('[\n\r]','')
end
RegisterStateDriver(bar, "visibility", (numButtons == 0 and "hide") or visibility)
RegisterStateDriver(bar, "visibility", (GetNumShapeshiftForms() == 0 and "hide") or visibility)
E:EnableMover(bar.mover:GetName())
else
RegisterStateDriver(bar, "visibility", "hide")
......@@ -294,11 +295,6 @@ function AB:AdjustMaxStanceButtons(event)
return
end
local visibility = self.db.stanceBar.visibility
if visibility and visibility:match('[\n\r]') then
visibility = visibility:gsub('[\n\r]','')
end
for i=1, #bar.buttons do
bar.buttons[i]:Hide()
end
......@@ -328,7 +324,16 @@ function AB:AdjustMaxStanceButtons(event)
self:StyleShapeShift()
end
RegisterStateDriver(bar, "visibility", (numButtons == 0 and "hide") or visibility)
if numButtons == 0 or not self.db.stanceBar.enabled then
RegisterStateDriver(bar, "visibility", "hide")
else
local visibility = self.db.stanceBar.visibility
if visibility and visibility:match('[\n\r]') then
visibility = visibility:gsub('[\n\r]','')
end
RegisterStateDriver(bar, "visibility", visibility)
end
end
function AB:UpdateStanceBindings()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment