diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-12 16:46:19 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-12 16:46:19 +0000 |
commit | 93bc6e5b58e321cd76b069d744a6f68acf530a9f (patch) | |
tree | 39150d1c1f067a1a13a18464694a7a9c3eddfa89 /gtk2_ardour/midi_region_view.cc | |
parent | d98302ae2c9040dd61573739b3bbdc708d1dd54e (diff) |
fix note selection behaviour, hopefully ... perhaps
git-svn-id: svn://localhost/ardour2/branches/3.0@5657 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 9fdd71922e..65bb61bb77 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1499,17 +1499,26 @@ void MidiRegionView::unique_select(ArdourCanvas::CanvasNoteEvent* ev) { for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) { + if ((*i) != ev) { - Selection::iterator tmp = i; - ++tmp; + Selection::iterator tmp = i; + ++tmp; - if ((*i) != ev) { - remove_from_selection (*i); - } + (*i)->selected (false); + _selection.erase (i); + + i = tmp; - 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); } |