Fix window size persistence

Fixes #1116
Fixes #1175
This commit is contained in:
Vojtech Kral 2018-08-06 18:26:29 +02:00 committed by bubnikv
parent 8988e8cf0a
commit 7258c597b9
9 changed files with 93 additions and 35 deletions

View file

@ -88,7 +88,7 @@ sub new {
$self->Fit;
$self->SetMinSize([760, 490]);
$self->SetSize($self->GetMinSize);
wxTheApp->restore_window_pos($self, "main_frame");
Slic3r::GUI::restore_window_size($self, "main_frame");
$self->Show;
$self->Layout;
}
@ -101,7 +101,7 @@ sub new {
return;
}
# save window size
wxTheApp->save_window_pos($self, "main_frame");
Slic3r::GUI::save_window_size($self, "main_frame");
# Save the slic3r.ini. Usually the ini file is saved from "on idle" callback,
# but in rare cases it may not have been called yet.
wxTheApp->{app_config}->save;