fix #16842: alignment of winged repeat barline#32436
Merged
miiizen merged 1 commit intomusescore:masterfrom Mar 6, 2026
Merged
fix #16842: alignment of winged repeat barline#32436miiizen merged 1 commit intomusescore:masterfrom
miiizen merged 1 commit intomusescore:masterfrom
Conversation
miiizen
approved these changes
Mar 6, 2026
Contributor
|
wanted for 4.7? |
Contributor
|
No thanks, we're limiting PRs to regressions & what's already in the project at this point |
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.
Resolves: #16842
The root cause of the issue is that, for end repeat barlines, the repeat dot is used as the origin of the X coordinate, causing the bounding box to extend beyond the right edge of the barline.
I updated the calculation of the horizontal offset
w1forreversedBracket, which was previously fixed to 0, so that it is computed correctly when a wing is present.In TLayout::layoutBarLine:
w1 is calculated as the difference between the width of a repeat barline without wings (w) and the width of the wing (font->width(SymId::reversedBracketTop, magS)).
In TLayout::layoutBarLine2:
Since bbox.x() already accounts for this offset, w1 is obtained as the difference from item->symBbox(SymId::reversedBracketTop).x(), which does not account for the offset.