#include "ardour/control_protocol_manager.h"
#include "ardour/search_paths.h"
-
+#include "ardour/selection.h"
+#include "ardour/session.h"
using namespace ARDOUR;
using namespace std;
for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) {
+ (*p)->protocol = 0; // protocol was already destroyed above.
delete (*p);
}
{
SessionHandlePtr::set_session (s);
- if (_session) {
+ 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) {
}
}
}
+
+ 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
ControlProtocolInfo* cpi = cpi_by_name (name);
if (cpi) {
+#ifndef NDEBUG
std::cerr << "protocol " << name << " active ? " << active << std::endl;
+#endif
if (active) {
delete cpi->state;