From 818a81aa40c5b34e2469a12986afd8d5c501d514 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 18 Oct 2020 03:05:33 +0200 Subject: [PATCH] Prepare removing static selection API 1/2 --- gtk2_ardour/editor.cc | 36 ------------------------------------ gtk2_ardour/editor.h | 2 -- gtk2_ardour/editor_mixer.cc | 6 ------ 3 files changed, 44 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 24bf02edde..fd69b6c68b 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -814,12 +814,6 @@ Editor::Editor () ControlProtocol::VerticalZoomInSelected.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_in_selected, this), gui_context()); ControlProtocol::VerticalZoomOutSelected.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_out_selected, this), gui_context()); - ControlProtocol::AddStripableToSelection.connect (*this, invalidator (*this), boost::bind (&Editor::control_select, this, _1, Selection::Add), gui_context()); - ControlProtocol::RemoveStripableFromSelection.connect (*this, invalidator (*this), boost::bind (&Editor::control_select, this, _1, Selection::Toggle), gui_context()); - ControlProtocol::SetStripableSelection.connect (*this, invalidator (*this), boost::bind (&Editor::control_select, this, _1, Selection::Set), gui_context()); - ControlProtocol::ToggleStripableSelection.connect (*this, invalidator (*this), boost::bind (&Editor::control_select, this, _1, Selection::Toggle), gui_context()); - ControlProtocol::ClearStripableSelection.connect (*this, invalidator (*this), boost::bind (&Editor::control_unselect, this), gui_context()); - BasicUI::AccessAction.connect (*this, invalidator (*this), boost::bind (&Editor::access_action, this, _1, _2), gui_context()); /* handle escape */ @@ -1026,36 +1020,6 @@ Editor::control_view (uint32_t view) goto_visual_state (view); } -void -Editor::control_unselect () -{ - selection->clear_tracks (); -} - -void -Editor::control_select (boost::shared_ptr s, Selection::Operation op) -{ - TimeAxisView* tav = time_axis_view_from_stripable (s); - - if (tav) { - switch (op) { - case Selection::Add: - selection->add (tav); - break; - case Selection::Toggle: - selection->toggle (tav); - break; - case Selection::Extend: - break; - case Selection::Set: - selection->set (tav); - break; - } - } else { - selection->clear_tracks (); - } -} - void Editor::control_step_tracks_up () { diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 9cf44ccfcf..3bec5f14d0 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1117,8 +1117,6 @@ private: void control_step_tracks_down (); void control_view (uint32_t); void control_scroll (float); - void control_select (boost::shared_ptr, Selection::Operation); - void control_unselect (); void access_action (const std::string&, const std::string&); void set_toggleaction (const std::string&, const std::string&, bool); bool deferred_control_scroll (samplepos_t); diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 9074c6f461..19d26dc9b7 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -224,12 +224,6 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) } } - /* Typically this is set by changing the TAV selection but if for any - * reason we decide to show a different strip for some reason, make - * sure that control surfaces can find it. - */ - ARDOUR::ControlProtocol::set_first_selected_stripable (stripable); - Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer")); if (act) {