Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corruption on section break in parts #26308

Merged

Conversation

mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Feb 3, 2025

Resolves: #24970

For every other system element, we conventionally set the track to zero. I don't know why it was chosen to set it to muse::nidx (i.e. an invalid value) for LayoutBreak elements. This was causing the section breaks to be saved with spurious staff index information, which was causing them to not be relinked on reading because their staves wouldn't match. Simply setting their tracks to zero seems to resolve both the corruption examples reported in the issue.

The second commit cleans up an unrelated thing about the drawing order (i.e. a cleaner way of making sure that LayoutBreak elements are drawn behind all notation).

@mike-spa mike-spa requested a review from oktophonie February 3, 2025 10:32
@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Feb 3, 2025

Wouldn't you need to fix

lb->setTrack(muse::nidx); // system-level element
and
lb->setTrack(muse::nidx); // this are system elements
and
layoutBreak->setTrack(muse::nidx); // this are system elements
too?

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 3, 2025
Backport of musescore#26308 plus fixing most clazy warnings
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 3, 2025
Backport of musescore#26308 plus fixing most clazy warnings
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 3, 2025
Backport of musescore#26308 plus fixing most clazy warnings
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 3, 2025
Backport of musescore#26308 plus fixing most clazy warnings
@mike-spa mike-spa force-pushed the fixCorruptionOnSectionBreakInParts branch from 9bc30f8 to 1fb01ff Compare February 3, 2025 15:17
@oktophonie oktophonie requested a review from miiizen February 3, 2025 17:52
@mike-spa mike-spa force-pushed the fixCorruptionOnSectionBreakInParts branch from 1fb01ff to 847046a Compare February 4, 2025 12:24
@mike-spa mike-spa merged commit 8f46017 into musescore:master Feb 5, 2025
11 checks passed
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 5, 2025
Backport of musescore#26308 plus fixing most clazy warnings
@mike-spa mike-spa deleted the fixCorruptionOnSectionBreakInParts branch February 17, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Section break is unlinked with parts and may cause score corruption
4 participants