summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-06-10 11:53:21 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-06-10 11:53:37 -0400
commit0f20819c8643974ce6d52fc1dc7ec3a18877d05b (patch)
treeb4855be59d33f45a12cc07f44c8c020608859fc1
parent2bc2aea009d967fa23f9b04f0dbd2919e68aecb4 (diff)
linker-agnostic version of recent commit to get ControlProtocol selection state set correctly
-rw-r--r--libs/ardour/control_protocol_manager.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc
index b510bd5aa7..7205b3e79e 100644
--- a/libs/ardour/control_protocol_manager.cc
+++ b/libs/ardour/control_protocol_manager.cc
@@ -96,17 +96,20 @@ ControlProtocolManager::set_session (Session* s)
CoreSelection::StripableAutomationControls sac;
_session->selection().get_stripables (sac);
- for (CoreSelection::StripableAutomationControls::iterator i = sac.begin(); i != sac.end(); ++i) {
- if ((*i).stripable) {
- cerr << "First selected being set to " << (*i).stripable->name() << endl;
- ControlProtocol::set_first_selected_stripable ((*i).stripable);
- break;
+ if (!sac.empty()) {
+ StripableNotificationListPtr v (new StripableNotificationList);
+ for (CoreSelection::StripableAutomationControls::iterator i = sac.begin(); i != sac.end(); ++i) {
+ if ((*i).stripable) {
+ v->push_back (boost::weak_ptr<Stripable> ((*i).stripable));
+ }
+ }
+ if (!v->empty()) {
+ StripableSelectionChanged (v); /* EMIT SIGNAL */
}
}
Glib::Threads::RWLock::ReaderLock lm (protocols_lock);
-
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
if ((*i)->requested || (*i)->mandatory) {
(void) activate (**i);