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.
This commit is contained in:
Robin Gareus 2018-12-07 03:36:48 +01:00
parent 4dc65e6613
commit d864f42d20
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View 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