Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20998: Added a midi mapping for 'Enter rest'; improved rest entry in 'Re-pitch existing notes' mode #26377

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/framework/shortcuts/view/mididevicemappingmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ inline ActionCodeList allMidiActions()
"pad-note-32",
"pad-note-64",
"undo",
"rest",
"pad-rest",
"tie",
"pad-dot",
Expand Down
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
3 changes: 2 additions & 1 deletion src/notation/internal/notationuiactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,8 @@ const UiActionList NotationUiActions::m_actions = {
mu::context::UiCtxProjectOpened,
mu::context::CTX_NOTATION_NOT_NOTE_INPUT_STAFF_TAB,
TranslatableString("action", "Rest"),
TranslatableString("action", "Enter rest")
TranslatableString("action", "Enter rest"),
IconCode::Code::REST
),
UiAction("rest-TAB",
mu::context::UiCtxProjectOpened,
Expand Down
Loading