Skip to content

Commit

Permalink
Fix: Regression from #605 and also allow for [prev measure/system] in…
Browse files Browse the repository at this point in the history
… note-entry even when input state has no ChordRest
  • Loading branch information
worldwideweary committed Oct 1, 2024
1 parent 4cfc597 commit 4ce3d14
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 4ce3d14

Please sign in to comment.