13
0

make butler thread merely ask for session state save, not actually do the save itself.

This prevents the possibility of cross-thread calls in the GUI when it adds its state
to the session via extra XML
This commit is contained in:
Paul Davis 2015-01-24 19:27:28 -05:00
parent 0b5ceaca4e
commit 1fb83d698c

View File

@ -677,9 +677,8 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
* save state only if there's no slave or if it's not yet locked. * save state only if there's no slave or if it's not yet locked.
*/ */
if (!_slave || !_slave->locked()) { if (!_slave || !_slave->locked()) {
DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: pending save\n")); DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: requests save\n"));
/* capture start has been changed, so save pending state */ SaveSessionRequested (_current_snapshot_name);
save_state ("", true);
saved = true; saved = true;
} }
} }
@ -691,7 +690,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
/* save the current state of things if appropriate */ /* save the current state of things if appropriate */
if (did_record && !saved) { if (did_record && !saved) {
save_state (_current_snapshot_name); SaveSessionRequested (_current_snapshot_name);
} }
if (ptw & PostTransportStop) { if (ptw & PostTransportStop) {