Skip to content

Conversation

@cbjeukendrup
Copy link
Member

Resolves: #30089

@mike-spa Do you think the 3rd commit is too risky?

@zacjansheski
Copy link
Contributor

Always hide instrument
In Nightly this is applied to all systems (expected)
In this PR it is only applied to the first system (not expected)

video1814978373.mp4

@cbjeukendrup cbjeukendrup force-pushed the 30089_crash_change_system_staff_visibility_in_single_system_score branch from 9eba4e4 to d023728 Compare September 25, 2025 19:47
@cbjeukendrup
Copy link
Member Author

Pushed a fix. @mike-spa could you please re-check the last commit? Now using Fraction::max() to indicate "layout all". I do feel like this part of the code needs a bigger refactor at some point, although I'm not sure yet what exactly needs to be done.

See explanation added in `EmptyStavesVisibilityModel::scheduleUpdateData`. Review with "hide whitespace changes".

Now, when changing system staff visibility in a single-system score, the popup will close on every change, instead of crashing.
There should be a difference between explicitly laying out the entire score from scratch, or just "accidentally" laying out a range that happens to span the entire score (for example, the first system in a single-system score).

This matters especially in `ScorePageViewLayout::prepareScore`, where the `layoutAll` code path is quite drastic.

This is a nice addition to the previous commit, because now the system staff visibility popup won't close anymore after every change when used in single-system scores.
@cbjeukendrup cbjeukendrup force-pushed the 30089_crash_change_system_staff_visibility_in_single_system_score branch from d023728 to 5ff8a7d Compare September 26, 2025 12:21
cbjeukendrup added a commit that referenced this pull request Sep 26, 2025
@cbjeukendrup cbjeukendrup merged commit 3d5d5cf into musescore:master Sep 26, 2025
13 checks passed
@cbjeukendrup cbjeukendrup deleted the 30089_crash_change_system_staff_visibility_in_single_system_score branch September 26, 2025 14:49
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.

Crash revealing hidden instrument in part

3 participants