Skip to content

Commit bdc0d50

Browse files
committed
Raid re-anchor: only treat POPULATED unanchored headers as a change
Review follow-up (PR #212). The headerUnanchored probe flagged any shown group header with no resolved rect, but the secure position snippet legitimately leaves EMPTY visible groups unanchored — so in any raid that doesn't fill all enabled groups the probe fired every pass, permanently defeating the redundant-reposition early-out and reintroducing snap jitter. Gate on counts[gi] > 0 (already computed in the same block): the real bug has populated-but-unanchored headers, so it is still caught.
1 parent 11c8f01 commit bdc0d50

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

Frames/Headers.lua

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3783,19 +3783,23 @@ function DF:ApplyRaidGroupSorting()
37833783
end
37843784
end
37853785

3786-
-- A header can be shown yet UNANCHORED: the secure position snippet
3787-
-- ClearAllPoints()s every group header and only re-anchors populated
3788-
-- slots, so a raid-to-party collapse (all counts hit 0) strips the
3789-
-- anchors while the caches above still describe the populated raid.
3790-
-- Converting back with the same roster, nothing above reads as
3791-
-- changed, and the early-out below would skip the only reposition
3792-
-- that could re-anchor the headers — frames stay alive (shown,
3793-
-- units assigned, alpha 1) but draw nothing until a /reload.
3794-
-- GetLeft() is nil on a frame with no resolved rect.
3786+
-- A POPULATED header can be shown yet UNANCHORED: the secure position
3787+
-- snippet ClearAllPoints()s every group header and only re-anchors
3788+
-- populated slots, so a raid-to-party collapse (all counts hit 0)
3789+
-- strips the anchors while the caches above still describe the
3790+
-- populated raid. Converting back with the same roster, nothing above
3791+
-- reads as changed, and the early-out below would skip the only
3792+
-- reposition that could re-anchor the headers — frames stay alive
3793+
-- (shown, units assigned, alpha 1) but draw nothing until a /reload.
3794+
-- GetLeft() is nil on a frame with no resolved rect. Gate on
3795+
-- counts[gi] > 0: an EMPTY visible group is legitimately left
3796+
-- unanchored by the same snippet, so testing it would fire on every
3797+
-- pass in any raid that doesn't fill all enabled groups, permanently
3798+
-- defeating the redundant-reposition early-out.
37953799
local headerUnanchored = false
37963800
for gi = 1, 8 do
37973801
local gh = DF.raidSeparatedHeaders[gi]
3798-
if gh and gh:IsShown() and not gh:GetLeft() then
3802+
if gh and counts[gi] > 0 and gh:IsShown() and not gh:GetLeft() then
37993803
headerUnanchored = true
38003804
break
38013805
end

0 commit comments

Comments
 (0)