summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/session.cc2
-rw-r--r--libs/ardour/session_state.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 928d2d64e0..b752bd23ea 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1472,7 +1472,7 @@ private:
Glib::Threads::Mutex peak_cleanup_lock;
int load_options (const XMLNode&);
- int load_state (std::string snapshot_name);
+ int load_state (std::string snapshot_name, bool from_template = false);
static int parse_stateful_loading_version (const std::string&);
samplepos_t _last_roll_location;
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 7a36c3e61e..1dedb86ade 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -363,7 +363,7 @@ Session::Session (AudioEngine &eng,
if (!mix_template.empty()) {
try {
- if (load_state (_current_snapshot_name)) {
+ if (load_state (_current_snapshot_name, /* from_template = */ true)) {
throw SessionException (_("Failed to load template/snapshot state"));
}
} catch (PBD::unknown_enumeration& e) {
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 59265baefe..e82637ad82 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -970,7 +970,7 @@ Session::restore_state (string snapshot_name)
}
int
-Session::load_state (string snapshot_name)
+Session::load_state (string snapshot_name, bool from_template)
{
delete state_tree;
state_tree = 0;
@@ -1035,7 +1035,7 @@ Session::load_state (string snapshot_name)
throw SessionException (string_compose (_("Incomatible Session Version. That session was created with a newer version of %1"), PROGRAM_NAME));
}
- if (Stateful::loading_state_version < CURRENT_SESSION_FILE_VERSION && _writable) {
+ if (Stateful::loading_state_version < CURRENT_SESSION_FILE_VERSION && _writable && !from_template) {
std::string backup_path(_session_dir->root_path());
std::string backup_filename = string_compose ("%1-%2%3", legalize_for_path (snapshot_name), Stateful::loading_state_version, statefile_suffix);