diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-12 14:51:31 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-12 14:51:39 +0100 |
commit | eb3f50e15c9f9ed1880c59fecd6f8b3edcc05820 (patch) | |
tree | 5acd3346a7a7d63f0f8d1375f60979ecb4579a1f /libs/surfaces/cc121 | |
parent | efc2660fec0d01c4c47d3fffcc5443025b33afc0 (diff) |
change the way ControlProtocols (control surfaces) are notified and handle Stripable selection changes
The Editor continues to notify them, but via a direct call to ControlProtocolManager, not a signal.
The CP Manager calls the ControlProtocol static method to set up static data structures holding
selection info for all surfaces and then notifies each surface/protocol that selection has changed.
Diffstat (limited to 'libs/surfaces/cc121')
-rw-r--r-- | libs/surfaces/cc121/cc121.cc | 12 | ||||
-rw-r--r-- | libs/surfaces/cc121/cc121.h | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/libs/surfaces/cc121/cc121.cc b/libs/surfaces/cc121/cc121.cc index 3f563db251..19301b86b8 100644 --- a/libs/surfaces/cc121/cc121.cc +++ b/libs/surfaces/cc121/cc121.cc @@ -115,8 +115,6 @@ CC121::CC121 (Session& s) ); - StripableSelectionChanged.connect (selection_connection, MISSING_INVALIDATOR, boost::bind (&CC121::gui_track_selection_changed, this, _1), this); - /* Catch port connections and disconnections */ ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&CC121::connection_handler, this, _1, _2, _3, _4, _5), this); buttons.insert (std::make_pair (EButton, Button (*this, _("EButton"), EButton))); @@ -1040,15 +1038,9 @@ CC121::Button::get_state () const } void -CC121::gui_track_selection_changed (StripableNotificationListPtr stripables) +CC121::stripable_selection_changed () { - boost::shared_ptr<Stripable> r; - - if (!stripables->empty()) { - r = stripables->front().lock(); - } - - set_current_stripable (r); + set_current_stripable (first_selected_stripable()); } void diff --git a/libs/surfaces/cc121/cc121.h b/libs/surfaces/cc121/cc121.h index a5f0363a22..bef1000ee6 100644 --- a/libs/surfaces/cc121/cc121.h +++ b/libs/surfaces/cc121/cc121.h @@ -298,7 +298,7 @@ class CC121 : public ARDOUR::ControlProtocol, public AbstractUI<CC121Request> { void drop_current_stripable (); void use_master (); void use_monitor (); - void gui_track_selection_changed (ARDOUR::StripableNotificationListPtr); + void stripable_selection_changed (); PBD::ScopedConnection selection_connection; PBD::ScopedConnectionList stripable_connections; |