Skip to content

Commit

Permalink
Merge pull request #43 from worldwideweary/3.x-www-0021-UpdateMovePrev
Browse files Browse the repository at this point in the history
Update: Allow [Previous Measure/System] when input state has no chordrest. (Also fixes a grace note regression)
  • Loading branch information
worldwideweary authored Oct 1, 2024
2 parents de42a23 + 0c76336 commit e965c07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2399,8 +2399,7 @@ 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 @@ -2541,8 +2540,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 e965c07

Please sign in to comment.