From 96316cb6b274edb639deb906c6483dce3c143425 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 2 Jan 2020 19:06:21 +0100 Subject: 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) --- gtk2_ardour/ardour_ui_dialogs.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gtk2_ardour/ardour_ui_dialogs.cc') diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 4064809d25..40181100a5 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -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()) { -- cgit v1.2.3