From cc12b6bba57ca98d5db567ca2bf9536d7d772e53 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 May 2012 21:01:43 +0000 Subject: [PATCH] Emit SelectionCleared() when unique-selecting the first note in a region, so that other regions clear their selections. git-svn-id: svn://localhost/ardour2/branches/3.0@12472 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_region_view.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 299ca8ee50..db68223908 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1941,6 +1941,14 @@ MidiRegionView::clear_selection_except (ArdourCanvas::CanvasNoteEvent* ev, bool { bool changed = false; + if (ev && !ev->selected ()) { + /* We're selecting this note, so the selection has changed; if + there is nothing else currently selected, the loop below will + not pick up on the change. + */ + changed = true; + } + for (Selection::iterator i = _selection.begin(); i != _selection.end(); ) { if ((*i) != ev) { Selection::iterator tmp = i;