use user-specified insertion point when adding new tracks/busses with a template
[ardour.git] / gtk2_ardour / ardour_ui.cc
index d47723260e27763f010e47393199d0b09609e716..f28913bab3a0ef642935602384d45ff50b23e934 100644 (file)
@@ -4063,9 +4063,9 @@ ARDOUR_UI::add_route_dialog_finished (int r)
 
        if (!template_path.empty()) {
                if (add_route_dialog->name_template_is_default())  {
-                       _session->new_route_from_template (count, PresentationInfo::max_order, template_path, string());
+                       _session->new_route_from_template (count, order, template_path, string());
                } else {
-                       _session->new_route_from_template (count, PresentationInfo::max_order, template_path, add_route_dialog->name_template());
+                       _session->new_route_from_template (count, order, template_path, add_route_dialog->name_template());
                }
                return;
        }