fix note selection behaviour, hopefully ... perhaps
git-svn-id: svn://localhost/ardour2/branches/3.0@5657 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d98302ae2c
commit
93bc6e5b58
@ -3401,7 +3401,13 @@ NoteDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
|
||||
bool extend = Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier);
|
||||
|
||||
if (!extend) {
|
||||
bool add = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
|
||||
|
||||
if (add) {
|
||||
region->note_selected (cnote, true);
|
||||
} else {
|
||||
region->unique_select (cnote);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1499,16 +1499,25 @@ void
|
||||
MidiRegionView::unique_select(ArdourCanvas::CanvasNoteEvent* ev)
|
||||
{
|
||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) {
|
||||
if ((*i) != ev) {
|
||||
|
||||
Selection::iterator tmp = i;
|
||||
++tmp;
|
||||
|
||||
if ((*i) != ev) {
|
||||
remove_from_selection (*i);
|
||||
}
|
||||
(*i)->selected (false);
|
||||
_selection.erase (i);
|
||||
|
||||
i = tmp;
|
||||
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
/* don't bother with removing this regionview from the editor selection,
|
||||
since we're about to add another note, and thus put/keep this
|
||||
regionview in the editor selection.
|
||||
*/
|
||||
|
||||
if (!ev->selected()) {
|
||||
add_to_selection (ev);
|
||||
|
Loading…
Reference in New Issue
Block a user