tweak logic for MIDI input follows selection
This commit is contained in:
parent
343136c728
commit
12c558f62e
@ -759,13 +759,15 @@ Session::rewire_selected_midi (boost::shared_ptr<MidiTrack> new_midi_target)
|
||||
AudioEngine::instance()->get_midi_selection_ports (msp);
|
||||
|
||||
if (!msp.empty()) {
|
||||
|
||||
if (old_midi_target) {
|
||||
for (PortManager::MidiSelectionPorts::const_iterator p = msp.begin(); p != msp.end(); ++p) {
|
||||
AudioEngine::instance()->disconnect (*p);
|
||||
}
|
||||
old_midi_target->input()->disconnect (this);
|
||||
}
|
||||
|
||||
for (PortManager::MidiSelectionPorts::const_iterator p = msp.begin(); p != msp.end(); ++p) {
|
||||
/* disconnect the port from everything */
|
||||
AudioEngine::instance()->disconnect (*p);
|
||||
/* connect it to the new target */
|
||||
new_midi_target->input()->connect (new_midi_target->input()->nth(0), (*p), this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user