Skip to content

Commit

Permalink
AceGUI-3.0: TreeGroup: Re-factor button hiding to help avoid bizarre …
Browse files Browse the repository at this point in the history
…button breakage
  • Loading branch information
Justw8 authored Dec 5, 2024
1 parent de82055 commit 0c3bea6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 47
local Type, Version = "TreeGroup", 48
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

Expand Down Expand Up @@ -387,10 +387,6 @@ local methods = {
["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
local buttons = self.buttons
local lines = self.lines

for i, v in ipairs(buttons) do
v:Hide()
end
while lines[1] do
local t = tremove(lines)
for k in pairs(t) do
Expand Down Expand Up @@ -499,6 +495,10 @@ local methods = {
buttonnum = buttonnum + 1
end

-- We hide the remaining buttons after updating others to avoid a blizzard bug that keeps them interactable even if hidden when hidden before updating the buttons.
for i = buttonnum, #buttons do
buttons[i]:Hide()
end
end,

["SetSelected"] = function(self, value)
Expand Down

0 comments on commit 0c3bea6

Please sign in to comment.