From 448b6f0cc712c0784d2c3bbd4860570ed420b854 Mon Sep 17 00:00:00 2001 From: Valeriy Kamyshniy Date: Thu, 2 Apr 2015 20:50:41 +0300 Subject: [PATCH] [Summary] Sort the routes of session before creating time axises unconditionally. This will keep tracks sorted even in case a new session created from template. Conflicts: gtk2_ardour/editor_routes.cc --- gtk2_ardour/editor_routes.cc | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index 26b6c11b12..7e71a7ad2f 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -1389,29 +1389,10 @@ EditorRoutes::initial_display () return; } - boost::shared_ptr routes = _session->get_routes(); - - if (ARDOUR_UI::instance()->session_is_new ()) { - - /* new session: stamp all routes with the right editor order - * key - */ - - _editor->add_routes (*(routes.get())); - - } else { - - /* existing session: sort a copy of the route list by - * editor-order and add its contents to the display. - */ - - RouteList r (*routes); - EditorOrderRouteSorter sorter; - - r.sort (sorter); - _editor->add_routes (r); - - } + RouteList r (*_session->get_routes()); + + r.sort (EditorOrderRouteSorter ()); + _editor->add_routes (r); } void