Strange slur is added when pressing S on the score's last note

• Oct 29, 2018 - 09:11
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Regression
No
Workaround
No
Project

Steps to reproduce:
1) Create a new score
2) Enter a note in the last measure so that there is no rest after it
3) Select the note, press S
Result: some strange slur is added:
Screenshot_20181029_110926.png
If you deselect it you will probably never see it, but it exists, as the object debugger says.

OS: Debian GNU/Linux 9 (stretch), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 64d3653


Comments

Status (old) active patch (code needs review)
Status active  

I believe the correct thing to do in this case would be to not add the slur at all, since it does not make sense to add a slur to the final note of a score. The same thing goes for adding a slur to a range selection that contains only one chord in a given track. Currently, as can be seen by using the debugger, a slur is added for the track, but it is not displayed. Instead, I believe the slur should not be added for a given track if the range only contains one chord in that track. See https://github.com/musescore/MuseScore/pull/4077.