mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
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
2 changed files with 24 additions and 9 deletions
|
|
@ -3401,7 +3401,13 @@ NoteDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
|
||||||
bool extend = Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier);
|
bool extend = Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier);
|
||||||
|
|
||||||
if (!extend) {
|
if (!extend) {
|
||||||
region->note_selected (cnote, true);
|
bool add = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
|
||||||
|
|
||||||
|
if (add) {
|
||||||
|
region->note_selected (cnote, true);
|
||||||
|
} else {
|
||||||
|
region->unique_select (cnote);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1499,17 +1499,26 @@ void
|
||||||
MidiRegionView::unique_select(ArdourCanvas::CanvasNoteEvent* ev)
|
MidiRegionView::unique_select(ArdourCanvas::CanvasNoteEvent* ev)
|
||||||
{
|
{
|
||||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) {
|
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) {
|
||||||
|
|
||||||
Selection::iterator tmp = i;
|
|
||||||
++tmp;
|
|
||||||
|
|
||||||
if ((*i) != ev) {
|
if ((*i) != ev) {
|
||||||
remove_from_selection (*i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = tmp;
|
Selection::iterator tmp = i;
|
||||||
|
++tmp;
|
||||||
|
|
||||||
|
(*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()) {
|
if (!ev->selected()) {
|
||||||
add_to_selection (ev);
|
add_to_selection (ev);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue