diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-02-11 16:46:30 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-02-11 16:46:30 -0700 |
commit | fac8d84786f420f91b68ce2e444579ea2162cb8d (patch) | |
tree | 9aef9048301983214f276fcc45f9e0a7151c29e1 | |
parent | 9d60197ffb42d33554db7f604ac05ab9e1ec342f (diff) |
move the point of adding a new MIDI track until *after* the instrument is added
This seems ripe with all kinds of subtle breakage potential. Sigh.
-rw-r--r-- | libs/ardour/session.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 66f6355c44..de68cd9830 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2378,7 +2378,6 @@ 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) { @@ -2402,6 +2401,8 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s } } } + + add_routes (new_routes, true, true, false, order); } return ret; |