summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/session.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 540665be18..e28685d03f 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3484,6 +3484,16 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
}
}
+ /* auditioner and monitor routes are not part of the order */
+ if (auditioner) {
+ assert (n_routes > 0);
+ --n_routes;
+ }
+ if (_monitor_out) {
+ assert (n_routes > 0);
+ --n_routes;
+ }
+
DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("ensure order gap starting at %1 for %2\n", order, new_routes.size()));
ensure_route_presentation_info_gap (order, new_routes.size());
@@ -3532,6 +3542,17 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
/* presentation info order may already have been set from XML */
if (!r->presentation_info().order_set()) {
+ /* this is only useful for headless sessions,
+ * Editor::add_routes() and Mixer_UI::add_routes() will
+ * override it following the RouteAdded signal.
+ *
+ * Also routes should be sorted before VCAs (like the GUI does).
+ * Session::ensure_route_presentation_info_gap() does not special case VCAs either.
+ *
+ * ... but not to worry, the GUI's
+ * gtk2_ardour/route_sorter.h and various ::sync_presentation_info_from_treeview()
+ * handle this :)
+ */
if (order == PresentationInfo::max_order) {
/* just add to the end */