semantically more correct ordering of previous commit

This commit is contained in:
Paul Davis 2017-06-10 12:04:27 -04:00
parent 0f20819c86
commit ae837b49ed

View file

@ -87,11 +87,19 @@ ControlProtocolManager::set_session (Session* s)
{ {
SessionHandlePtr::set_session (s); SessionHandlePtr::set_session (s);
if (_session) { if (!_session) {
return;
}
/* get selection info and set it before instantiating any {
* control protocols. 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);
}
}
}
CoreSelection::StripableAutomationControls sac; CoreSelection::StripableAutomationControls sac;
_session->selection().get_stripables (sac); _session->selection().get_stripables (sac);
@ -107,15 +115,6 @@ ControlProtocolManager::set_session (Session* s)
StripableSelectionChanged (v); /* EMIT SIGNAL */ 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);
}
}
}
} }
int int