summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorValeriy Kamyshniy <vkamyshniy@wavesglobal.com>2015-04-02 20:50:41 +0300
committerPaul Davis <paul@linuxaudiosystems.com>2015-04-02 16:32:28 -0400
commit5001a680fc23469698c914cdd85372f19f81f25c (patch)
treea4bbbcebf2dea987debd104599569288acbb6085 /gtk2_ardour
parentd13fe65b89a201232a93a207ec6ac8d532c5fd10 (diff)
[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
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_routes.cc27
1 files 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<RouteList> 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