Remove selected range should work to delete notes / rests in note input mode

• Jun 18, 2020 - 23:40
Reported version
3.4
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

As the title says. In note input mode, Ctrl+Delete should work the same as it does in normal mode. As far as I can tell, the only reason it doesn't is that STATE_NOTE_INPUT was left out of the valid state list in shortcuts.cpp. Then all we need to do is fix up the input cursor.


Comments

Status PR created fixed

Fixed in branch 3.x, commit 9327d31a61

_fix #306950

Resolves: https://musescore.org/en/node/306950

Currently, Ctrl+Delete to remove a range works well on single notes,
but only in normal mode.
Nothing about the code prevents it from working in note input mode,
where it would be incredibly valuable for certain types of edits
(particularly in conjunction with the insert note commands).
This commit enables the command for note input mode
by adding that state to the shortcut definition.
The only other change needed was to make sure something is selected
after deletion, so I added code to select the next note normally,
or if deleting to the end of score, the last note,
or if the user has deleted the entire score,
I append a new measure.
An alternative would be to force user out of note input mode,
but this felt bette,r plus I couldn't find a clean way to do that
from libmscore._

Fix version
3.5.1