13
0

linker-agnostic version of recent commit to get ControlProtocol selection state set correctly

This commit is contained in:
Paul Davis 2017-06-10 11:53:21 -04:00
parent 2bc2aea009
commit 0f20819c86

View File

@ -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);