Courtesy time signature not removed when subsequent measures are deleted
Reported version
3.1
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.1.0.6567, revision: 3c54040
See attached file. There is a courtesy Time Sig. at the end of system 1.
- Delete the Time Sig. at the start of system 2.
Result: As expected. The courtesy Time Sig. is deleted as well. - UNDO, select from the measure at the start of system 2 to the end of score, and press Ctrl + Delete.
Expected result: Measures are deleted leaving NO courtesy time sig.
Actual result: The courtesy Time Sig. remains at the end of system 1. A workaround is to close the score and reopen it; or append a measure to the score, then delete it.
Attachment | Size |
---|---|
courtesy_time_sig_not_deleted.mscz | 5.33 KB |
Fix version
3.5.0
Comments
For the record, the bug is also present in 3.0.5, and 2.3.2 as well. Also, the delete/undo steps aren't needed. Just load the score and delete from start of second system to end. Easily reproducible from scratch as well - default score, add time sig to start of second system, delete from there to end.
Same issue with keysigs, in master, FWIW, but in this case, it's not present in 2.3.2.
And same happens for courtesy clefs too.
see https://github.com/musescore/MuseScore/pull/5653 and #295207: Mscz file corrupted after splitting a measure
missunderstanding...
https://github.com/musescore/MuseScore/pull/5662
Fixed in branch master, commit 2aafb6fd30
_fix #287998 and #102676
Resolves: https://musescore.org/en/node/287998
Resolves: https://musescore.org/en/node/102676
When a measure contains a line or page break and the next measure contains a key/time
signature or clef change, a courtesy element is drawn at the end of the measure.
However, if all measures after the line or page break are deleted, these courtesy
elements are not removed because Measure::addSystemTrailer(Measure) is never called
in Score::collectSystem(LayoutContext&) since there is no next measure. As a result
these courtesy elements are not disabled by Measure::addSystemTrailer(Measure).
The solution is to call Measure::addSystemTrailer(Measure) even when nm equals 0 and
Measure::addSystemTrailer(Measure) will disable all courtesy elements in case nm equals 0._
Fixed in branch master, commit a564a28b31
_Merge pull request #5662 from njvdberg/issue-287998-courtesy-ts-on-measure-delete
fix #287998 and #102676 : Courtesy time signature not removed when subsequent measures are deleted_
Automatically closed -- issue fixed for 2 weeks with no activity.