The "R" key don't preserve slurs after the first operation

• Jul 18, 2014 - 10:52
Type
Graphical (UI)
Severity
S4 - Minor
Status
closed
Project

Nightly, July 18 (8b01e86) / Windows7

1) New score
2) Add a few notes and slurs in the first measure (in mode entry note, or exit, no matter, the result is the same)
3) Select the measure, then use the "R" key to repeat x times

Result: the links are preserved only once (measure 2), and then disappear from the measure 3 and followings

R key slurs.mscz

Attachment Size
R key slurs.mscz 1.54 KB

Comments

This goes the same for copy paste operations. After the first copy-paste operation, we can see that the slurs in the second measure are highlighting along with the first measure.

I have found out that this is caused by the read code incorrectly setting the start and end chord.
When we generate the xml, for each spanner that is copied, we generate a new id. When we paste the clipboard contents, we assign the same id to a different slur. Later a call to findSpanner return the spanner in the first bar instead of the spanner in measure 2.

How should the id's behave? Should we already have new id's in the clipboard?

My solution would be to leave the id for the source elements be, and create new ones on paste with a help of a map ( old_spanner_id -> new_spanner_id ).

Thank you to consider this question.

Another aspect:

- If you delete the second measure copied-pasted, or repeated, with Ctrl + Del (Suppr), the slurs remain suspended in the staff. Like this:

slurs copy-paste ctrl delete.jpg

But if you save and reopen the score, the slurs are gone.

- In the case of a single deletion of the content of the measure ("Del" key), removal normally works.

Attachment Size
slurs copy-paste ctrl delete.jpg 9.47 KB