13
0

Re-add global lookup for generic-midi ctrl state

This commit is contained in:
Robin Gareus 2019-03-23 03:11:54 +01:00
parent 087fd57d37
commit 73029d45ba
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 1 additions and 4 deletions

View File

@ -631,7 +631,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
if ((*niter)->get_property ("id", id)) {
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Relearned binding for session: Control ID: %1\n", id.to_s()));
boost::shared_ptr<PBD::Controllable> c = session->controllable_by_id (id); // XXX are these all?
boost::shared_ptr<PBD::Controllable> c = Controllable::by_id (id);
if (c) {
MIDIControllable* mc = new MIDIControllable (this, *_input_port->parser(), c, false);

View File

@ -144,7 +144,6 @@ MIDIControllable::set_controllable (boost::shared_ptr<PBD::Controllable> c)
last_incoming = 256;
if (c) {
printf ("MIDIControllable::set %s\n", c->name().c_str());
c->Destroyed.connect_same_thread (controllable_death_connection,
boost::bind (&MIDIControllable::drop_controllable, this, _1));
}
@ -278,8 +277,6 @@ MIDIControllable::lookup_controllable()
void
MIDIControllable::drop_controllable (Controllable* c)
{
printf ("MIDIControllable::drop_controllable ? %s\n", c->name().c_str());
boost::shared_ptr<Controllable> controllable = _controllable.lock ();
if (controllable && c == controllable.get()) {
set_controllable (boost::shared_ptr<PBD::Controllable>());