Skip to content

Fix initial clef changing when replacing instrument after an instrument change (#32340)#32419

Open
pyonpyoco wants to merge 1 commit intomusescore:masterfrom
pyonpyoco:fix-32340-initial-clef
Open

Fix initial clef changing when replacing instrument after an instrument change (#32340)#32419
pyonpyoco wants to merge 1 commit intomusescore:masterfrom
pyonpyoco:fix-32340-initial-clef

Conversation

@pyonpyoco
Copy link
Contributor

@pyonpyoco pyonpyoco commented Feb 27, 2026

Resolves: #32340

This PR fixes #32340 where replacing an instrument via Staff/Part Properties after an instrument change unexpectedly changes the initial clef (staff <defaultClef>).

Use the staff’s current default clef instead, so the dialog does not update the staff <defaultClef> in the instrument-change scenario.

Testing

  1. after instrument change: replace instrument → initial clef unchanged (fixed)
  2. before instrument change: replace instrument → initial clef changes (expected)
  3. another staff without instrument change: replace instrument → initial clef changes (expected)
2026-02-26.0200.32340light.mp4

If you already have a fix in progress, feel free to close this PR.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

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.

Replacing instrument in Staff/Part Properties after Instrument Change changes also initial Clef

1 participant