cut and paste corrupts voice2

• Dec 13, 2011 - 01:06
Type
Functional
Severity
S2 - Critical
Status
closed
Project

MS1.1, W7

step 1: create a 4/4 score with these notes in measure1: 8 eighth notes in voice1, 1 half note and 1 half rest in voice2
step 2: select the second eighth note and shift right-arrow to select the rest of measure1
step 3: ctrl-x to cut the selection
step 4: select the 2nd voice1 rest and ctrl-v to paste

expected result: voice1 and voice2 have 4 beats in measure1
actual result: voice2 has extra rest beats in measure1

Attachment Size
step4.mscz 1.54 KB
step3.mscz 1.4 KB
step1.mscz 1.46 KB
step2.mscz 1.48 KB

Comments

This issue is certainly similar to #11889 in the net effect of a corrupted measure, but am not sure that it is the same underlying issue, since this issue is present in both 1.1 and 2.0 nightlies. I'll also note that I raised this issue as a credible explanation for a whole bunch of forum-reported voice problems from MS1.1 users, where secondary voices were corrupted.

Status (old) active needs info

This appears to have been fixed in the process of development.
Please check and close if agreed.

Status (old) active patch (ready to commit)

This fixes the problem as stated.

https://github.com/musescore/MuseScore/pull/629

The code could probably do with some revision because :

1) other elements are not handled (eg tuplets)
2) it only works for pasting within voice 1
3) There are some odd anachronisms in the code, for example e.track() appears
to return an incorrect value until e.read() has been issued. There are many
instances of this in this section of code.