Fix: Update clef elements when changing default instrument#32630
Merged
RomanPudashkin merged 1 commit intomusescore:masterfrom Mar 20, 2026
Merged
Conversation
9a11ebd to
392a1c0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
Yes. But is sticking to the old way of setting part default clef better? |
409e413 to
db22639
Compare
db22639 to
68491cf
Compare
b355f90 to
d43895f
Compare
Contributor
Author
|
Changed to a more minimal fix. Ready for review. |
Co-authored-by: Cubiking <yuk.chiu@student.manchester.ac.uk>
d43895f to
d4fea40
Compare
mathesoncalum
approved these changes
Mar 19, 2026
Contributor
mathesoncalum
left a comment
There was a problem hiding this comment.
Looks good @CubikingChill. FYI I've re-committed with a more descriptive commit message (the original was just "fix"). If you could keep this in mind for any future PRs that would great - thank you!
Contributor
Author
|
Noted. Thank you. |
Contributor
Author
|
Can you check the latest nightly? I don't think the fix works :( |
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.
This fixes a regression introduced by 99b5b5b ("EditStaff: don't unexpectedly change clef when pressing OK without making changes").
That commit changed applyStaffProperties() to read the clef from m_staff->defaultClefType() instead of m_instrument.clefType(). However, showReplaceInstrumentDialog() never updates m_staff's default clef type when the instrument changes, so on the second apply() call (Apply then OK), applyStaffProperties() sends the stale old clef, reverting the change.
The fix adds m_staff->setDefaultClefType(m_instrument.clefType(0)) in showReplaceInstrumentDialog() to keep m_staff consistent with the selected instrument.
Resolves: #32633