Corruption when expanding multimeasure rests after undoing the deletion of it
Manjaro Linux, revision e666061 Nightly
1. New Score.
2. Press "M" for multimeasure rests.
3. Select the entire "measure" with the multimeasure rest.
4. Press "Delete".
5. Undo the deletion.
6. Press "M" again to expand the multimeasure rests.
Corruption. Measures that were part of the multimeasure rest appear empty.
Method 1. Changing time signature or deleting the old time signature that the measure had puts the rests back.
Method 2. If the first measure of all staves is corrupted, adding a (temporary) stave, and then following the first method works.
Same corruption happens when selecting a multimeasure rest and other notes and then deleting.
From the debug output, the problem seems to lie in the processing of cmd or AddElement::cleanup.
I would guess that multimeasure rests are not handled properly.
I suspect that it would be fine to handle the deletion of multimeasure rests like normal rests.
When deleting a multimeasure rest in debug mode, a line similar to
"Segment::add(Rest) there is already a Rest at 1:0:0(0) track 0. score 0x54e6e70"