Raid Frames: suppress intermediate relayouts while retargeting the flat header - #2053
Open
dfrisone wants to merge 1 commit into
Open
Raid Frames: suppress intermediate relayouts while retargeting the flat header#2053dfrisone wants to merge 1 commit into
dfrisone wants to merge 1 commit into
Conversation
…t header Changing point, xOffset, yOffset and columnAnchorPoint one at a time relayouts visible children after each write, and a pass that has taken the new point but not yet the new column anchor can leave both the old and the new point sitting on column starts. Set the header's _ignore for the run of writes so the Hide/Show below rebuilds once from the complete layout, the same way Blizzard's own setAttributesWithoutResponse brackets a group of header attributes. Reported and confirmed fixed by the reporter on 9.1.7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Changing raid frame growth direction left frames anchored wrong until a reload.
Cause
_LayoutGroupsImplretargets the flat header by writingpoint,xOffset,yOffsetandcolumnAnchorPointone at a time. Each write firesSecureGroupHeader_OnAttributeChanged, which relayouts every visible childimmediately, so the header relayouts three times on the way to the state we
want. The pass that has already taken the new
pointbut not yet the newcolumnAnchorPointcan leave both the old and the new point sitting on columnstarts, and that intermediate result is what survived.
Fix
Set the header's
_ignorefor the run of writes and restore the previous valueafterwards, so the
Hide()/Show()immediately below rebuilds once from thecomplete layout instead of three times from partial ones. This is Blizzard's own
idiom:
setAttributesWithoutResponseinSecureGroupHeaders.luabrackets agroup of header attribute writes exactly this way, and
SecureGroupHeader_OnAttributeChangedbails on_ignoreat its first line.Seven lines, one file, no new settings.
Acceptance criteria
header was already being retargeted.
identical, only the number of intermediate relayouts changes.
SetAttributecalls replacetwo full child relayout passes.
_LayoutGroupsImplreturns early underInCombatLockdown(), so no attribute write here can reach a header in combat._ignoreis long-standingSecureGroupHeadersbehaviour,not a new API.
Testing
Confirmed fixed in game by the original reporter on 9.1.7. Growth direction
changes now settle in one pass with no reload.
Known gap, deliberately not widened
The per-group path (8 separated headers, same file) writes
point,xOffsetand
yOffsetthrough the same unbracketed idiom. It does not writecolumnAnchorPoint, so the specific old-and-new-point interaction above cannotarise there and nothing has been reported against it. Left alone rather than
changed speculatively; happy to bracket it too if you would rather have the two
paths symmetric.