mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
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
1 changed files with 5 additions and 7 deletions
|
|
@ -2440,17 +2440,15 @@ MidiRegionView::toggle_matching_notes (uint8_t notenum, uint16_t channel_mask)
|
|||
void
|
||||
MidiRegionView::note_selected (NoteBase* ev, bool add, bool extend)
|
||||
{
|
||||
if (!add) {
|
||||
clear_selection_internal ();
|
||||
add_to_selection (ev);
|
||||
}
|
||||
|
||||
if (!extend) {
|
||||
|
||||
if (!ev->selected()) {
|
||||
add_to_selection (ev);
|
||||
if (!add) {
|
||||
clear_selection_internal ();
|
||||
}
|
||||
|
||||
add_to_selection (ev);
|
||||
return;
|
||||
|
||||
} else {
|
||||
/* find end of latest note selected, select all between that and the start of "ev" */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue