fix handling of new session

defer save state till after everything done in post_engine_init() is complete.
This commit is contained in:
Paul Davis 2013-09-11 09:59:56 -04:00
parent d305dc1e0c
commit 7c719e441a
2 changed files with 5 additions and 4 deletions

View File

@ -1466,6 +1466,7 @@ Session::set_frame_rate (framecnt_t frames_per_second)
*/
_base_frame_rate = frames_per_second;
_nominal_frame_rate = frames_per_second;
sync_time_vars();

View File

@ -312,8 +312,10 @@ Session::post_engine_init ()
DirtyChanged (); /* EMIT SIGNAL */
if (state_was_pending) {
save_state (_current_snapshot_name);
if (_is_new) {
save_state ("");
} else if (state_was_pending) {
save_state ("");
remove_pending_capture_state ();
state_was_pending = false;
}
@ -546,8 +548,6 @@ Session::create (const string& session_template, BusProfile* bus_profile)
add_monitor_section ();
}
save_state ("");
return 0;
}