[trunk] Measures long 2/1 or more not cleared to measure rest

• Oct 8, 2011 - 19:03
S4 - Minor

Setup: rev. 4850; Ubuntu 11.04, Qt SDK 1.1.3 (Qt lib 4.7.4)


1) Create or open a score with a time signature of 4/2 (or equivalent: 8/4, 2/1, ...) or more
2) Select one or more measures
3) Clear the measure(s) ([Del])

Result: The measure(s) are not filled with measure rests but with the rest(s) needed to reach the actual measure duration (a breve rest or more).

This is inconvenient as there is not way to get the measure rest back (short of manually editing the .mscx file).

Note: The same happens while copying and pasting runs of notes including measure rests: in the pasted copy the measure rests are replaced with actual rests.

Analysis: This happens because function Score::setRest() (in file libmscore/edit.cpp) restricts the use of measure rests to measures shorter than a breve. The meaning of (or even the need for) such a restriction is not clear.

The attached patch simply removes the above restriction by commenting out a line of that function. Developers with greater familiarity with the code may check if this raises other non-obvious side effects.



Attachment Size
trunk_breve_measure_rests_edit_cpp.patch 814 bytes


Just ran into this in 1.1 on a score I'm working on now, in 5/2. If you know of any workarounds aside from editing the MSCX file (which I may resort to), let me know!

Yes, I know the same issue also affects 1.1; the same patch (or one very similar) also corrects it.

As soon as this patch will be reviewed (side effects?) and applied to trunk, I'll post a patch for 1.1 too.



Status (old) patch (code needs review) patch (ready to commit)

The original patch cannot be compiled any longer because of other changes. I'm attaching an updated patch.



P.S.: Is there a reason for not applying it? Some side effect has been discoved of which I was not aware?

Attachment Size
trunk_breve_measure_rests_edit_cpp.patch 748 bytes
Status (old) patch (ready to commit) fixed

sorry, i postponed this patch.
There is something special with measures of 4/2 or longer. Elaine Gould says in "Behind Bars": "The semibreve rest acts as a whole-bar rest in any time signature. For all time signatures of 4/2 of 8/4 or over, the breve rest represents a whole bar rest."
I applied the patch. Missing is the change of the whole rest symbol for 4/2 or over. I have also the feeling that there might be other places which have to be changed. Will check...

Thanks for applying the patch.

In fact, the change from semi-brevis to brevis rest symbol for 4/2 times and over IS implemented! Thanks for this too!