musescore / musescore/MuseScore

First clef and key signature not redrawn after Replace Instrument

Open
#34,268 4 comments 0 reactions 2 assignees View on GitHub

@davidstephengrant is already working on this.

Since Jul 21, 2026.

engraving P2
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Engraving bug (incorrect score rendering)

Description with steps to reproduce

The first clef and key signature are not redrawn if the initial measures contain a multi-measure rest and the instrument is replaced.

  1. Create empty score with Trumpet in B♭
  2. fill all measures with notes after measure 4
  3. Turn on multi-measure rest
  4. Replace Trumpet with Trombone
  5. First clef and key signature don't change
  • The issue is present in all versions of Musescore 4 (at least since Musescore 4.0.2)
  • The issue is fixed after toggling multi-measure rests or reopening the project.
Supporting files, videos and screenshots

https://github.com/user-attachments/assets/411fe019-3dcd-46c5-b70e-a8a172675031

In which versions of MuseScore Studio is this issue present?

MuseScore Studio version (64-bit): 4.7.4-260706075, revision: github-musescore-musescore-7688c00

Regression

No.

Operating system

windows 10

Additional context

This issue is based on a report from https://musescore.org/en/node/394837

Checklist
  • This report follows the guidelines for reporting bugs and issues
  • I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • I have attached all requested files and information to this report
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.