[MU4] Lyrics copy paste fix
Fixed this bugs:
- If the user selected text in the lyrics and inserted new text, then insertion at the end occurs, not replacement
- When copying a text from another text box and pasting it to lyrics, formatting text is inserted into the lyric.
@oktophonie FYI Pasting formatting for lyrics does not work at the moment (release, master), you can test it by copying any text from the score (for example, from the title) and pasting it into the lyrics.
In this PR, I have explicitly disabled pasting formatting for lyrics.
Inserting formatting for lyrics should be implemented as part of a separate task. Of course, if we need this feature for the lyrics.
If the user tried to insert text with symbols, then only the first part before the symbol is inserted. For example, for “1. Bla Bla” the result will be “1.“
This should be like in MS3: when pasting a text with spaces it should interpret each space as a move to next syllable (gradual buffer release after each Ctr+V press). Actually, it doesn't work in master as well - #13215
Fixed this bugs:
* If the user selected text in the lyrics and inserted new text, then insertion at the end occurs, not replacement * When copying a text from another text box and pasting it to lyrics, formatting text is inserted into the lyric.
Tested these on Win10, Mac12, LinuxUbuntu 22.04 - FIXED
Excellent. Thanks guys!
I thought "Bug 1" was not bug, but feature.
It was used quite often, when pasting lyrics sylabe-by-sylabe.
User prepared "sy-la-be". But sometimes, it needed to be "syla-be". So after "sy-" user went back and continues pasting and "sy-" became "syla-", which was great and fast.
Of course, sometimes user wanted replace sylabe, instead of adding it, but in my experience, it was way less often, than adding sylabe to previous one.
When you press the right arrow to go back to a previous syllable, the whole string of that syllable is selected:
and in this situation it seems like completely predictable and expected behaviour that pasting, or typing anything, would replace the syllable.
To append to the end instead, all one needs to do is press the right arrow once first.