Multiline slur cannot be fully deleted if it spans for more than one measure in its first system
Steps to reproduce:
1. Open this score: multiline_slur.mscz.
2. Select the slur in it.
3. Press Delete.
Expected results: slur is fully removed.
Actual results: slur segment in the second staff is still present. You cannot remove it but it disappears on file save.
Comments
This happens with several different types of spanner (but not Ottavas). The reason is that the case for ElementType::OTTAVA in Score::removeElement() includes these lines:
whereas the corresponding code in the handling of other spanners is commented out. I do not know why it was commented out in the one place and left enabled in the other, but I do know that the orphan spanner segments disappear upon relayout of the systems to which they belong. One way to fix this issue is to replace the loop that removes spanner segments from their systems with the line
Come to think of it, this is needed anyway for Autoplace to do its job.
I am increasing the priority to critical because, not surprisingly, this issue can lead to a crash.
1. Create a spanner (not an Ottava) that spans multiple measures in one system and extends to the next system.
2. Undo.
3. Select the remaining spanner segment, and press Delete.
This will cause the program will crash.
See https://github.com/musescore/MuseScore/pull/4061.
Fixed in branch master, commit 5d126adda7
fix #277436: Multiline slur cannot be fully deleted if it spans for more than one measure in its first system
Fixed in branch master, commit edba9900a3
Merge pull request #4061 from mattmcclinch/277436-remove-spanner
fix #277436: Multiline slur cannot be fully deleted if it spans for more than one measure in its first system
Automatically closed -- issue fixed for 2 weeks with no activity.