MuseScore
MuseScore copied to clipboard
Fix #13986: Adjust spanners when measures are deleted
Resolves: https://github.com/musescore/MuseScore/issues/13986
First, if the highlighted measure here is deleted, the endpoints of the slur do not change:
If these highlighted measures are deleted, the slur's start point will be moved up to the first beat of the third measure:
(The same will happen when the second two measures are deleted--its endpoint will adjust back to the 4th beat of the first measure)
Finally, when this measure is deleted, all of these slurs will be removed as well:
The middle slur will be deleted because both of its endpoints are inside of the removed range. The outer slurs could potentially be adjusted backwards like the ones above, except that would put the endpoint of the slur on the same note as the startpoint. So instead of dealing with zero-length slurs, they are removed.
Grace notes are also taken into consideration when considering what the last (or first) cr of a measure is:
When the highlighted measures are deleted, the slurs adjust to the appropriate grace note rather than deleting because they're on the same tick.