summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-03-15 02:57:39 +1100
committernick_m <mainsbridge@gmail.com>2015-03-15 02:57:39 +1100
commitbf72a02f744b87f941b43dd70cfda1a11bf8578b (patch)
tree0550cf2f5227aae3da3aa71cdd24679596eae8f0 /gtk2_ardour
parentb72fc759c05b16f707b998cbf2a7acea447c4001 (diff)
Fix incorrect track ordering when creating a session from a template
(supplied order keys are correct). This really shouldn't be needed, but historically there have been races between the treeview and the editor order keys. Interesting to note that there have been no reported ordering bugs when loading sessions.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_routes.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc
index 5ca5f67f42..761212d9a2 100644
--- a/gtk2_ardour/editor_routes.cc
+++ b/gtk2_ardour/editor_routes.cc
@@ -636,7 +636,7 @@ void
EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
{
PBD::Unwinder<bool> at (_adding_routes, true);
-
+ bool from_scratch = (_model->children().size() == 0);
Gtk::TreeModel::Children::iterator insert_iter = _model->children().end();
for (Gtk::TreeModel::Children::iterator it = _model->children().begin(); it != _model->children().end(); ++it) {
@@ -716,8 +716,9 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
_display.set_model (_model);
/* now update route order keys from the treeview/track display order */
-
- sync_order_keys_from_treeview ();
+ if (!from_scratch) {
+ sync_order_keys_from_treeview ();
+ }
}
void