mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +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
|
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…
Add table
Add a link
Reference in a new issue