MIDI editing: clean up logic for ::note_selected()
The behavior should be the same but the logical intent of the code is now more obvious.
This commit is contained in:
parent
948fc52c5c
commit
e01452c6a6
|
@ -2440,17 +2440,15 @@ MidiRegionView::toggle_matching_notes (uint8_t notenum, uint16_t channel_mask)
|
||||||
void
|
void
|
||||||
MidiRegionView::note_selected (NoteBase* ev, bool add, bool extend)
|
MidiRegionView::note_selected (NoteBase* ev, bool add, bool extend)
|
||||||
{
|
{
|
||||||
if (!add) {
|
|
||||||
clear_selection_internal ();
|
|
||||||
add_to_selection (ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!extend) {
|
if (!extend) {
|
||||||
|
|
||||||
if (!ev->selected()) {
|
if (!add) {
|
||||||
add_to_selection (ev);
|
clear_selection_internal ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_to_selection (ev);
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* find end of latest note selected, select all between that and the start of "ev" */
|
/* find end of latest note selected, select all between that and the start of "ev" */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user