Skip to content

Commit

Permalink
fix #63176: Note input cursor glitches for voice >1 when advancing in…
Browse files Browse the repository at this point in the history
…to gaps
  • Loading branch information
lasconic committed Jul 12, 2015
1 parent d4bb0a3 commit 096e59f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,9 +1849,16 @@ Element* Score::move(const QString& cmd)
if (noteEntryMode())
_is.moveToNextInputPos();
el = nextChordRest(cr);
if (!el)
el = cr;
}
else if (cmd == "prev-chord") {
if (noteEntryMode() && _is.segment()) {
// when there is no cr at input position for current voice,
// this is a sign that input cursor has advanced into a gap / empty measure
// use selected chord if present,
if (inputState().cr() == nullptr && cr == selection().cr())
el = cr;
Segment* s = _is.segment()->prev1();
//
// if _is._segment is first chord/rest segment in measure
Expand All @@ -1874,7 +1881,8 @@ Element* Score::move(const QString& cmd)
s = m->first(Segment::Type::ChordRest);
_is.moveInputPos(s);
}
el = prevChordRest(cr);
if (!el)
el = prevChordRest(cr);
}
else if (cmd == "next-measure") {
el = nextMeasure(cr);
Expand Down

0 comments on commit 096e59f

Please sign in to comment.