diff --git a/src/engraving/dom/textedit.cpp b/src/engraving/dom/textedit.cpp index 30bafe8742320..77e12c39df70b 100644 --- a/src/engraving/dom/textedit.cpp +++ b/src/engraving/dom/textedit.cpp @@ -118,7 +118,9 @@ void TextBase::startEdit(EditData& ed) if (!ldata || ldata->layoutInvalid) { renderer()->layoutItem(this); } - if (!ted->cursor()->set(ed.startMove)) { + + //! NOTE: startMove will be null if we didn't use the mouse (e.g. we added a lyric with the spacebar) + if (!ed.startMove.isNull() && !ted->cursor()->set(ed.startMove)) { resetFormatting(); } double _spatium = spatium(); diff --git a/src/notation/internal/notationinteraction.cpp b/src/notation/internal/notationinteraction.cpp index 430a26c0c54f8..16bb7f3182b35 100644 --- a/src/notation/internal/notationinteraction.cpp +++ b/src/notation/internal/notationinteraction.cpp @@ -139,7 +139,7 @@ static qreal nudgeDistance(const mu::engraving::EditData& editData, qreal raster static PointF bindCursorPosToText(const PointF& cursorPos, const EngravingItem* text) { - if (!text || !text->isTextBase()) { + if (cursorPos.isNull() || !text || !text->isTextBase()) { return PointF(); } @@ -5020,7 +5020,11 @@ void NotationInteraction::navigateToLyrics(bool back, bool moveOnly, bool end) nextLyrics->setTrack(track); cr = toChordRest(nextSegment->element(track)); nextLyrics->setParent(cr); + nextLyrics->setNo(verse); + const mu::engraving::TextStyleType styleType(nextLyrics->isEven() ? TextStyleType::LYRICS_EVEN : TextStyleType::LYRICS_ODD); + nextLyrics->setTextStyleType(styleType); + nextLyrics->setPlacement(placement); nextLyrics->setPropertyFlags(mu::engraving::Pid::PLACEMENT, pFlags); nextLyrics->setSyllabic(mu::engraving::LyricsSyllabic::SINGLE); @@ -5177,7 +5181,11 @@ void NotationInteraction::navigateToNextSyllable() toLyrics = Factory::createLyrics(cr); toLyrics->setTrack(track); toLyrics->setParent(cr); + toLyrics->setNo(verse); + const mu::engraving::TextStyleType styleType(toLyrics->isEven() ? TextStyleType::LYRICS_EVEN : TextStyleType::LYRICS_ODD); + toLyrics->setTextStyleType(styleType); + toLyrics->setPlacement(placement); toLyrics->setPropertyFlags(mu::engraving::Pid::PLACEMENT, pFlags); toLyrics->setSyllabic(mu::engraving::LyricsSyllabic::END); @@ -5259,7 +5267,11 @@ void NotationInteraction::navigateToLyricsVerse(MoveDirection direction) lyrics = Factory::createLyrics(cr); lyrics->setTrack(track); lyrics->setParent(cr); + lyrics->setNo(verse); + const mu::engraving::TextStyleType styleType(lyrics->isEven() ? TextStyleType::LYRICS_EVEN : TextStyleType::LYRICS_ODD); + lyrics->setTextStyleType(styleType); + lyrics->setPlacement(placement); lyrics->setPropertyFlags(mu::engraving::Pid::PLACEMENT, pFlags); lyrics->setFontStyle(fStyle); @@ -5824,7 +5836,11 @@ void NotationInteraction::addMelisma() toLyrics = Factory::createLyrics(cr); toLyrics->setTrack(track); toLyrics->setParent(cr); + toLyrics->setNo(verse); + const mu::engraving::TextStyleType styleType(toLyrics->isEven() ? TextStyleType::LYRICS_EVEN : TextStyleType::LYRICS_ODD); + toLyrics->setTextStyleType(styleType); + toLyrics->setPlacement(placement); toLyrics->setPropertyFlags(mu::engraving::Pid::PLACEMENT, pFlags); toLyrics->setSyllabic(mu::engraving::LyricsSyllabic::SINGLE); @@ -5885,7 +5901,11 @@ void NotationInteraction::addLyricsVerse() lyrics->setParent(oldLyrics->chordRest()); lyrics->setPlacement(oldLyrics->placement()); lyrics->setPropertyFlags(mu::engraving::Pid::PLACEMENT, oldLyrics->propertyFlags(mu::engraving::Pid::PLACEMENT)); + lyrics->setNo(newVerse); + const mu::engraving::TextStyleType styleType(lyrics->isEven() ? TextStyleType::LYRICS_EVEN : TextStyleType::LYRICS_ODD); + lyrics->setTextStyleType(styleType); + lyrics->setFontStyle(fStyle); lyrics->setPropertyFlags(mu::engraving::Pid::FONT_STYLE, fFlags);