summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-07 20:35:59 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-07 20:35:59 +0000
commitc1a10ef31f5df38a8e2d0501be6dd22c4d3372fc (patch)
tree0ff5ad21bf4653d3b30c94a08ea4adcf80af5735 /libs
parent84ed50fd8b03b79f489a6f299c3cab34d3288dab (diff)
weak version of "Save As"
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6323 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/session_state.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 7c074c90f6..ad02c1f6f9 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -443,7 +443,7 @@ class Session : public PBD::StatefulDestructible
nframes_t worst_input_latency () const { return _worst_input_latency; }
nframes_t worst_track_latency () const { return _worst_track_latency; }
- int save_state (string snapshot_name, bool pending = false);
+ int save_state (string snapshot_name, bool pending = false, bool switch_to_snapshot = false);
int restore_state (string snapshot_name);
int save_template (string template_name);
int save_history (string snapshot_name = "");
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 0abe1b652e..efdac5eae3 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -661,7 +661,7 @@ Session::remove_state (string snapshot_name)
}
int
-Session::save_state (string snapshot_name, bool pending)
+Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot)
{
XMLTree tree;
string xml_path;
@@ -681,6 +681,8 @@ Session::save_state (string snapshot_name, bool pending)
if (snapshot_name.empty()) {
snapshot_name = _current_snapshot_name;
+ } else if (switch_to_snapshot) {
+ _current_snapshot_name = snapshot_name;
}
if (!pending) {