13
0

Revert "move the point of adding a new MIDI track until *after* the instrument is added"

This reverts commit fac8d84786.

This fixes fan-out. The track should be created before any tracks or
busses are created that are fed by the MIDI track.

The apparent motivation for fac8d847 was MIDNAM related
(there was code in the GUI that needed the instrument, which was
called from within ::add_routes).

This should no longer be the case, the GUI needs to pick up
instrument changes after track creation via processors changed;
besides MIDI busses were still created before the instrument.
This commit is contained in:
Robin Gareus 2020-04-02 21:31:04 +02:00
parent 14f15ca1e9
commit dabd5715e9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2474,6 +2474,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
failed:
if (!new_routes.empty()) {
StateProtector sp (this);
add_routes (new_routes, true, true, false, order);
if (instrument) {
for (RouteList::iterator r = new_routes.begin(); r != new_routes.end(); ++r) {
@ -2497,8 +2498,6 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
}
}
}
add_routes (new_routes, true, true, false, order);
}
return ret;