MuseScore
MuseScore copied to clipboard
Fix #15407: Hide zero-length lyrics dashes
Resolves: https://github.com/musescore/MuseScore/issues/15407
See comment, the solution for this one has changed.
This one ended up being a little more in-depth than I expected it to be.
- If the user places exactly one underscore (or dash) and then ends editing, the melisma is deleted and the alignment of the lyric is reset.
- If the user places multiple dashes, the lyric will be left-justified (as it spans multiple notes), but if the editing ends with that string of dashes, the original lyric will again have its alignment reset and the "melisma" will be deleted.
Issue https://github.com/musescore/MuseScore/issues/15093 was extremely similar, so I just added it to this PR since it deals with the same behavior.
If the ticks for a lyric become zero for any reason now (not just when editing a lyric finishes), the lyric re-lays-out to make sure invalid segments don't remain.