From d864f42d2097f3aad3bdd7b00bdb093a4ffb4cb5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 7 Dec 2018 03:36:48 +0100 Subject: [PATCH] Fix editor sizing issue introduced in 4dc65e66 Previously Editor::instant_save() returned if no session was loaded, effectively Config->add_instant_xml(get_state()); was never called. instant save() is called early on, in Editor's c'tor before the editor is realized and saves invalid window-size and window-state, which are used later. --- gtk2_ardour/editor.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b0b58d6c7f..07aa7df46c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -983,15 +983,11 @@ Editor::set_entered_track (TimeAxisView* tav) void Editor::instant_save () { - if (!constructed || no_save_instant) { + if (!constructed || !_session || no_save_instant) { return; } - if (_session) { - _session->add_instant_xml(get_state()); - } else { - Config->add_instant_xml(get_state()); - } + _session->add_instant_xml(get_state()); } void