diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 4 |
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) { |