diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-02-03 22:23:55 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2016-02-03 22:30:41 +1000 |
commit | dd05f1e257f8a715d23625bb725a727c57c4c0b6 (patch) | |
tree | 1b10f0e0be820072aee5b9180a389fe42221edbf /libs/surfaces/generic_midi/midicontrollable.cc | |
parent | 07f8c04e2e4113df84d64c6ea7464569431e9820 (diff) |
Fix bug #5633, Don't drop all midi bindings when a track is removed
Only drop the controllable that is being destroyed, not all of them.
Diffstat (limited to 'libs/surfaces/generic_midi/midicontrollable.cc')
-rw-r--r-- | libs/surfaces/generic_midi/midicontrollable.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index 3a1aea592f..1051503fc4 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -142,7 +142,7 @@ MIDIControllable::set_controllable (Controllable* c) if (controllable) { controllable->Destroyed.connect (controllable_death_connection, MISSING_INVALIDATOR, - boost::bind (&MIDIControllable::drop_controllable, this), + boost::bind (&MIDIControllable::drop_controllable, this, _1), MidiControlUI::instance()); } } @@ -264,9 +264,11 @@ MIDIControllable::lookup_controllable() } void -MIDIControllable::drop_controllable () +MIDIControllable::drop_controllable (Controllable* c) { - set_controllable (0); + if (c == controllable) { + set_controllable (0); + } } void |