summaryrefslogtreecommitdiff
path: root/gtk2_ardour/session_dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/session_dialog.cc')
-rw-r--r--gtk2_ardour/session_dialog.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc
index 11b01d8948..8dcb0b5a23 100644
--- a/gtk2_ardour/session_dialog.cc
+++ b/gtk2_ardour/session_dialog.cc
@@ -104,6 +104,10 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
info_frame.set_border_width (12);
get_vbox()->pack_start (info_frame, false, false);
+ if (!template_name.empty()) {
+ load_template_override = template_name;
+ }
+
setup_new_session_page ();
if (!new_only) {
@@ -113,10 +117,6 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
get_vbox()->pack_start (session_new_vbox, true, true);
}
- if (!template_name.empty()) {
- load_template_override = template_name;
- }
-
get_vbox()->show_all ();
/* fill data models and show/hide accordingly */
@@ -285,8 +285,7 @@ std::string
SessionDialog::session_template_name ()
{
if (!load_template_override.empty()) {
- string the_path (ARDOUR::user_template_directory());
- return Glib::build_filename (the_path, load_template_override + ARDOUR::template_suffix);
+ return Glib::build_filename (ARDOUR::user_template_directory (), load_template_override);
}
if (template_chooser.get_selection()->count_selected_rows() > 0) {
@@ -681,7 +680,7 @@ SessionDialog::setup_new_session_page ()
HBox* template_hbox = manage (new HBox);
//if the "template override" is provided, don't give the user any template selections (?)
- if ( load_template_override.empty() ) {
+ if (load_template_override.empty()) {
template_hbox->set_spacing (8);
Gtk::ScrolledWindow *template_scroller = manage (new Gtk::ScrolledWindow());