Fix editor sizing issue introduced in 4dc65e66
authorRobin Gareus <robin@gareus.org>
Fri, 7 Dec 2018 02:36:48 +0000 (03:36 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 7 Dec 2018 02:46:47 +0000 (03:46 +0100)
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

index b0b58d6c7f18efd676f7770a84bd8d5d4c6656ac..07aa7df46ca3da6918f005862e7e44207f685c59 100644 (file)
@@ -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