Revert "[Summary] Sort the routes of session before creating time axises unconditiona...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 6 Apr 2015 16:21:26 +0000 (12:21 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 6 Apr 2015 16:21:26 +0000 (12:21 -0400)
(Mistakenly applied cherry-pick)

This reverts commit 448b6f0cc712c0784d2c3bbd4860570ed420b854.

gtk2_ardour/editor_routes.cc

index 7e71a7ad2f6c6a91cae4d7da7799170e6377d422..26b6c11b12960490cc10dc4d638942e229092912 100644 (file)
@@ -1389,10 +1389,29 @@ EditorRoutes::initial_display ()
                return;
        }
 
-       RouteList r (*_session->get_routes());
-               
-       r.sort (EditorOrderRouteSorter ());
-       _editor->add_routes (r);
+       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);
+
+       }
 }
 
 void