a more nuanced version of the "do-not-automatically-disconnect-selection-follows-input
This commit is contained in:
parent
66f73f40db
commit
8b212bfa12
@ -756,6 +756,18 @@ Session::rewire_selected_midi (boost::shared_ptr<MidiTrack> new_midi_target)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (vector<string>::const_iterator p = msp.begin(); p != msp.end(); ++p) {
|
for (vector<string>::const_iterator p = msp.begin(); p != msp.end(); ++p) {
|
||||||
|
PortManager::MidiPortInformation mpi (AudioEngine::instance()->midi_port_information (*p));
|
||||||
|
|
||||||
|
/* if a port is marked for control data, do not
|
||||||
|
* disconnect it from everything since it may also be
|
||||||
|
* used via a control surface or some other
|
||||||
|
* functionality.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!(mpi.properties & MidiPortControl)) {
|
||||||
|
/* disconnect the port from everything */
|
||||||
|
AudioEngine::instance()->disconnect (*p);
|
||||||
|
}
|
||||||
/* connect it to the new target */
|
/* connect it to the new target */
|
||||||
new_midi_target->input()->connect (new_midi_target->input()->nth(0), (*p), this);
|
new_midi_target->input()->connect (new_midi_target->input()->nth(0), (*p), this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user