Skip to content

Commit

Permalink
20998: "Enter rest" in Repitch mode will respect the underlying duration
Browse files Browse the repository at this point in the history
  • Loading branch information
krasko78 committed Feb 27, 2025
1 parent 740b3e8 commit 556a2a9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/notation/internal/notationinteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5058,6 +5058,18 @@ void NotationInteraction::putRestToSelection()

if (is.usingNoteEntryMethod(NoteEntryMethod::BY_DURATION) || is.usingNoteEntryMethod(NoteEntryMethod::RHYTHM)) {
m_noteInput->padNote(Pad::REST);
} else if (is.usingNoteEntryMethod(NoteEntryMethod::REPITCH)) {
ChordRest* cr = is.cr();
if (cr) {
TDuration duration = cr->durationType();
if (duration.isValid() && !duration.isZero()) {
if (duration.isMeasure()) {
is.moveToNextInputPos();
} else {
putRest(duration);
}
}
}
} else {
putRest(is.duration());
}
Expand Down

0 comments on commit 556a2a9

Please sign in to comment.