Skip to content

Commit

Permalink
[Bugfix] Fix Power Bar not immediately updating visibility on Power F…
Browse files Browse the repository at this point in the history
…ilter changes
  • Loading branch information
Krealle committed Feb 11, 2025
1 parent 988ff0f commit e97710f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UnitFrames/UnitButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ function U:UpdateUnitButtonLayout(unit, kind, button)
U:UpdateUnitButtonPosition(unit, button)
end

if kind == "powerFilter" then
button.widgets.powerBar.Update(button)
end

if not kind or kind == "alwaysUpdate" then
button.alwaysUpdate = layout[unit].alwaysUpdate
end
Expand Down
2 changes: 2 additions & 0 deletions Widgets/Bars/PowerBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ end
---@param unit UnitToken?
local function Update(button, event, unit)
local powerBar = button.widgets.powerBar
if not powerBar.enabled then return end

powerBar:UpdateVisibility()
if powerBar.active then
powerBar.UpdatePowerType(button)
Expand Down

0 comments on commit e97710f

Please sign in to comment.