use insert at specification when duplicating tracks/busses
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Aug 2016 13:41:53 +0000 (09:41 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Aug 2016 13:41:59 +0000 (09:41 -0400)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/duplicate_routes_dialog.cc

index d1a14aed7b00bf77b82f33a8bd31ac6c48681e88..d47723260e27763f010e47393199d0b09609e716 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())  {
 
        if (!template_path.empty()) {
                if (add_route_dialog->name_template_is_default())  {
-                       _session->new_route_from_template (count, template_path, string());
+                       _session->new_route_from_template (count, PresentationInfo::max_order, template_path, string());
                } else {
                } else {
-                       _session->new_route_from_template (count, template_path, add_route_dialog->name_template());
+                       _session->new_route_from_template (count, PresentationInfo::max_order, template_path, add_route_dialog->name_template());
                }
                return;
        }
                }
                return;
        }
index a6d66b4fa48fb45f2738251c88ff655332cea8c6..c5e4010f0f51e1eeaf14198e8311cb3c5a092954 100644 (file)
@@ -377,6 +377,8 @@ public:
 
        Gtkmm2ext::ActionMap global_actions;
 
 
        Gtkmm2ext::ActionMap global_actions;
 
+       ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
+
 protected:
        friend class PublicEditor;
 
 protected:
        friend class PublicEditor;
 
@@ -681,7 +683,6 @@ private:
        bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
        void save_session_as ();
        void rename_session ();
        bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
        void save_session_as ();
        void rename_session ();
-       ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
 
        int         create_mixer ();
        int         create_editor ();
 
        int         create_mixer ();
        int         create_editor ();
index 3e34f9e381181d8bbbf484056afb98036723f745..1b97599c5bb98557c0e3ce476d91f9cb98e59867 100644 (file)
@@ -22,6 +22,7 @@
 #include "ardour/route.h"
 #include "ardour/session.h"
 
 #include "ardour/route.h"
 #include "ardour/session.h"
 
+#include "ardour_ui.h"
 #include "editor.h"
 #include "duplicate_routes_dialog.h"
 #include "selection.h"
 #include "editor.h"
 #include "duplicate_routes_dialog.h"
 #include "selection.h"
@@ -170,7 +171,7 @@ DuplicateRouteDialog::on_response (int response)
                }
 
                XMLNode& state (rui->route()->get_state());
                }
 
                XMLNode& state (rui->route()->get_state());
-               RouteList rl = _session->new_route_from_template (cnt, state, std::string(), playlist_action);
+               RouteList rl = _session->new_route_from_template (cnt, ARDOUR_UI::instance()->translate_order (insert_at()), state, std::string(), playlist_action);
 
                /* normally the state node would be added to a parent, and
                 * ownership would transfer. Because we don't do that here,
 
                /* normally the state node would be added to a parent, and
                 * ownership would transfer. Because we don't do that here,