Skip to content

Commit

Permalink
[Note Entry] Allow [move to previous chord] to use note-entry voice w…
Browse files Browse the repository at this point in the history
…hen score selection is of a different voice
  • Loading branch information
worldwideweary authored and Jojo-Schmitz committed Sep 1, 2024
1 parent 38ea611 commit 899b2d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2488,13 +2488,16 @@ Element* Score::move(const QString& cmd)
}
else if (cmd == "prev-chord" && cr) {
// note input cursor
bool noteEntryPos = false;
if (noteEntryMode() && _is.segment()) {
Measure* m = _is.segment()->measure();
Segment* s = _is.segment()->prev1(SegmentType::ChordRest);
int track = _is.track();
for (; s; s = s->prev1(SegmentType::ChordRest)) {
if (s->element(track) || (s->measure() != m && s->rtick().isZero())) {
if (s->element(track)) {
el = s->nextChordRest(track, true);
noteEntryPos = true;
if (s->element(track)->isRest() && toRest(s->element(track))->isGap())
continue;
}
Expand All @@ -2507,7 +2510,7 @@ Element* Score::move(const QString& cmd)
// selection "cursor"
// find previous chordrest, which might be a grace note
// this may override note input cursor
el = prevChordRest(cr);
el = noteEntryPos ? el : prevChordRest(cr);

// Skip gap rests if we're not in note entry mode...
while (!noteEntryMode() && el && el->isRest() && toRest(el)->isGap())
Expand Down

0 comments on commit 899b2d3

Please sign in to comment.