diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index f40b60e77d..aa1cf4bf73 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4866,7 +4866,6 @@ Session::reset_last_capture_sources () continue; } tr->reset_last_capture_sources (); - } } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index d4627c40cc..a8b785852a 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -774,6 +774,13 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot XMLTree tree; std::string xml_path(_session_dir->root_path()); + if (!pending) { + /* Prevent destructive edits after explicit save or snapshot changes. + * Otherwise this one can delete sources used by other snapshot + */ + reset_last_capture_sources (); + } + /* prevent concurrent saves from different threads */ Glib::Threads::Mutex::Lock lm (save_state_lock);