summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-08-18 01:51:02 +0200
committerRobin Gareus <robin@gareus.org>2017-08-18 02:38:25 +0200
commitf85c320759e0fb8d95ea29982d6e3d94646b5de4 (patch)
tree15b007b02f45d0bff12950c33cae77a064e020a6 /gtk2_ardour/ardour_ui.cc
parentbfee5a65d2678e5a17677b3480a97656f196c533 (diff)
Push user track-templates to the template list
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index bd11d128c3..95a97d2829 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -4377,9 +4377,9 @@ ARDOUR_UI::add_route_dialog_response (int r)
return;
}
- std::string template_name = add_route_dialog->get_template_path();
- if (!template_name.empty() && template_name.substr (0, 11) == "urn:ardour:") {
- meta_session_setup (template_name.substr (11));
+ std::string template_path = add_route_dialog->get_template_path();
+ if (!template_path.empty() && template_path.substr (0, 11) == "urn:ardour:") {
+ meta_session_setup (template_path.substr (11));
return;
}
@@ -4388,21 +4388,20 @@ ARDOUR_UI::add_route_dialog_response (int r)
}
PresentationInfo::order_t order = translate_order (add_route_dialog->insert_at());
- string template_path = add_route_dialog->track_template();
+ const string name_template = add_route_dialog->name_template ();
DisplaySuspender ds;
- if (!template_path.empty()) {
- if (add_route_dialog->name_template_is_default()) {
- _session->new_route_from_template (count, order, template_path, string());
+ if (!template_path.empty ()) {
+ if (add_route_dialog->name_template_is_default ()) {
+ _session->new_route_from_template (count, order, template_path, string ());
} else {
- _session->new_route_from_template (count, order, template_path, add_route_dialog->name_template());
+ _session->new_route_from_template (count, order, template_path, name_template);
}
return;
}
ChanCount input_chan= add_route_dialog->channels ();
ChanCount output_chan;
- string name_template = add_route_dialog->name_template ();
PluginInfoPtr instrument = add_route_dialog->requested_instrument ();
RouteGroup* route_group = add_route_dialog->route_group ();
AutoConnectOption oac = Config->get_output_auto_connect();