summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-06-10 12:04:27 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-06-10 12:04:27 -0400
commitae837b49ed8d00c484cf7e99f3485e67c94daf79 (patch)
tree57d2e222889a81551daa49afc5bdd8720e2adfe5
parent0f20819c8643974ce6d52fc1dc7ec3a18877d05b (diff)
semantically more correct ordering of previous commit
-rw-r--r--libs/ardour/control_protocol_manager.cc39
1 files changed, 19 insertions, 20 deletions
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc
index 7205b3e79e..8616848467 100644
--- a/libs/ardour/control_protocol_manager.cc
+++ b/libs/ardour/control_protocol_manager.cc
@@ -87,27 +87,11 @@ ControlProtocolManager::set_session (Session* s)
{
SessionHandlePtr::set_session (s);
- if (_session) {
-
- /* get selection info and set it before instantiating any
- * control protocols.
- */
-
- CoreSelection::StripableAutomationControls sac;
- _session->selection().get_stripables (sac);
-
- 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 */
- }
- }
+ if (!_session) {
+ return;
+ }
+ {
Glib::Threads::RWLock::ReaderLock lm (protocols_lock);
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
@@ -116,6 +100,21 @@ ControlProtocolManager::set_session (Session* s)
}
}
}
+
+ CoreSelection::StripableAutomationControls sac;
+ _session->selection().get_stripables (sac);
+
+ 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 */
+ }
+ }
}
int