Skip to content

Commit

Permalink
Fix regression and also allow for [prev measure/system] in note-entry…
Browse files Browse the repository at this point in the history
… even when input state has no ChordRest

Port of #666
  • Loading branch information
worldwideweary authored and Jojo-Schmitz committed Oct 2, 2024
1 parent e4a08e5 commit 3c34944
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/engraving/dom/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2860,8 +2860,8 @@ EngravingItem* Score::move(const String& cmd)
// to catch up with the cursor and not move the selection by 2 positions
cr = selection().cr();
if (cr && (cr->isGrace() || cmd == u"next-chord" || cmd == u"prev-chord")) {
} else {
cr = inputState().cr();
} else if (auto is = inputState().cr() ){
cr = is;
}
} else if (selection().activeCR()) {
cr = selection().activeCR();
Expand Down Expand Up @@ -3012,8 +3012,11 @@ EngravingItem* Score::move(const String& cmd)
// selection "cursor"
// find previous chordrest, which might be a grace note
// this may override note input cursor
el = prevChordRest(cr);

if (auto pcr = prevChordRest(cr)) {
if (prevChordRest(cr)->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 3c34944

Please sign in to comment.