Unconditionally save instant.xml on session-close

This forces saving session-specific GUI settings (Playhead
position, zoom/scroll with stationary PH, window and pane
positions, etc.

While many GUI operations immediately cause an instant.xml
save, changing the playhead-pos in particular does not, nor
mark the session as modified.

This fixes an issue:
 1. open session
 2. move playhead
 3. close session
 4. re-open session, expect playhead at position from (2)
This commit is contained in:
Robin Gareus 2020-01-02 19:06:21 +01:00
parent c07e13b7ac
commit 96316cb6b2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -280,6 +280,16 @@ ARDOUR_UI::unload_session (bool hide_stuff)
{
if (_session) {
ARDOUR_UI::instance()->video_timeline->sync_session_state();
/* Unconditionally save session-specific GUI settings:
* Playhead position, zoom/scroll with stationary PH,
* window and pane positions, etc.
*
* While many GUI operations immediately cause an instant.xml
* save, changing the playhead-pos in particular does not,
* nor mark the session dirty.
*/
save_ardour_state ();
}
if (_session && _session->dirty()) {