### 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 - [x] This report follows the [guidelines](https://github.com/musescore/MuseScore/wiki/Reporting-bugs-and-issues) for reporting bugs and issues - [x] I have verified that this issue has not been logged before, by searching the [issue tracker](https://github.com/musescore/MuseScore/issues) for similar issues - [x] I have attached all requested files and information to this report - [x] I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
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.
Supporting files, videos and screenshots
clef_redrawn_bug.mp4
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