diff --git a/libmscore/cmd.cpp b/libmscore/cmd.cpp index 4cd13966133d5..ae45a15e466a4 100644 --- a/libmscore/cmd.cpp +++ b/libmscore/cmd.cpp @@ -2370,8 +2370,8 @@ Element* Score::move(const QString& cmd) cr = selection().cr(); if (cr && (cr->isGrace() || cmd == "next-chord" || cmd == "prev-chord")) ; - else - cr = inputState().cr(); + else cr = inputState().cr() ? inputState().cr() : cr; + } else if (selection().activeCR()) cr = selection().activeCR(); @@ -2512,8 +2512,9 @@ Element* Score::move(const QString& cmd) // selection "cursor" // find previous chordrest, which might be a grace note // this may override note input cursor - el = noteEntryPos ? el : prevChordRest(cr); - + if (auto pcr = prevChordRest(cr)) { + el = (noteEntryPos && !pcr->isGrace()) ? el : pcr; + } // Skip gap rests if we're not in note entry mode... while (!noteEntryMode() && el && el->isRest() && toRest(el)->isGap()) el = prevChordRest(toChordRest(el));