From 5001a680fc23469698c914cdd85372f19f81f25c 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 72c7fcf0ff..48547fd0c8 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -1394,29 +1394,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