diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 3cde505335..aae20d876d 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -304,6 +304,7 @@ Editor::Editor () , _region_selection_change_updates_region_list (true) , _following_mixer_selection (false) + , _following_mixer_bridge_view_selection (false) , _control_point_toggled_on_press (false) , _stepping_axis_view (0) , current_mixer_strip (0) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 0b7cf3d9f2..bf774e1271 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -2095,6 +2095,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void follow_mixer_selection (); bool _following_mixer_selection; + void follow_mixer_bridge_view_selection (); + bool _following_mixer_bridge_view_selection; + int time_fx (ARDOUR::RegionList&, float val, bool pitching); void note_edit_done (int, EditNoteDialog*); void toggle_sound_midi_notes (); diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index b9fc1d5407..fcc3d019d7 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -255,13 +255,14 @@ void Editor::track_mixer_selection () { Mixer_UI::instance()->selection().RoutesChanged.connect (sigc::mem_fun (*this, &Editor::follow_mixer_selection)); + _mixer_bridge_view.selection().RoutesChanged.connect (sigc::mem_fun (*this, &Editor::follow_mixer_bridge_view_selection)); _mixer_bridge_view.track_editor_selection (); } void Editor::follow_mixer_selection () { - if (!ARDOUR::Config->get_link_editor_and_mixer_selection() || _following_mixer_selection) { + if (/*!ARDOUR::Config->get_link_editor_and_mixer_selection() ||*/ _following_mixer_selection) { return; } @@ -283,3 +284,30 @@ Editor::follow_mixer_selection () selection->block_tracks_changed (false); selection->TracksChanged (); /* EMIT SIGNAL */ } + + +void +Editor::follow_mixer_bridge_view_selection () +{ + if (/*!ARDOUR::Config->get_link_editor_and_mixer_selection() || */_following_mixer_bridge_view_selection) { + return; + } + + _following_mixer_bridge_view_selection = true; + selection->block_tracks_changed (true); + + RouteUISelection& s (_mixer_bridge_view.selection().routes); + + selection->clear_tracks (); + + for (RouteUISelection::iterator i = s.begin(); i != s.end(); ++i) { + TimeAxisView* tav = get_route_view_by_route_id ((*i)->route()->id()); + if (tav) { + selection->add (tav); + } + } + + _following_mixer_bridge_view_selection = false; + selection->block_tracks_changed (false); + selection->TracksChanged (); /* EMIT SIGNAL */ +}