use insert at specification when duplicating tracks/busses

This commit is contained in:
Paul Davis
2016-08-22 09:41:53 -04:00
parent cab3fc09de
commit 39e9add5c0
3 changed files with 6 additions and 4 deletions

View 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, template_path, string());
_session->new_route_from_template (count, PresentationInfo::max_order, template_path, string());
} 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;
}

View File

@@ -377,6 +377,8 @@ public:
Gtkmm2ext::ActionMap global_actions;
ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
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 ();
ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
int create_mixer ();
int create_editor ();

View File

@@ -22,6 +22,7 @@
#include "ardour/route.h"
#include "ardour/session.h"
#include "ardour_ui.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());
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,