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 e0c1b4f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 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,10 @@ 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);

cr = firstCR;
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 e0c1b4f

Please sign in to comment.