diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index e9edaba61f..a69257ec25 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -201,7 +201,6 @@ Editor::typed_event (ArdourCanvas::Item* item, GdkEvent *event, ItemType type) default: break; } - return ret; } diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 67b4710b7a..ea28845aba 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -651,16 +651,10 @@ Editor::track_selection_changed () } for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { - (*i)->set_selected (false); - if (mouse_mode == MouseRange) { - (*i)->hide_selection (); - } - } - - for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { - (*i)->set_selected (true); - if (mouse_mode == MouseRange) { - (*i)->show_selection (selection->time); + if (find (selection->tracks.begin(), selection->tracks.end(), *i) != selection->tracks.end()) { + (*i)->set_selected (true); + } else { + (*i)->set_selected (false); } } } @@ -687,6 +681,7 @@ Editor::time_selection_changed () } else { ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, true); } + } void diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 8df4f40ca7..b36b60750d 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -546,12 +546,16 @@ TimeAxisView::popup_size_menu (guint32 when) void TimeAxisView::set_selected (bool yn) { - AxisView::set_selected (yn); + if (yn == _selected) { + return; + } + + Selectable::set_selected (yn); if (_selected) { controls_ebox.set_name (controls_base_selected_name); controls_frame.set_name (controls_base_selected_name); - + /* propagate any existing selection, if the mode is right */ if (editor.current_mouse_mode() == Editing::MouseRange && !editor.get_selection().time.empty()) { @@ -572,8 +576,6 @@ TimeAxisView::set_selected (bool yn) for (vector::iterator i = children.begin(); i != children.end(); ++i) { (*i)->set_selected (false); } - - } }