From 20be57dc582b53014cca5e51b73a585ebdcff8c1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 18 Mar 2019 23:22:38 +0100 Subject: [PATCH] Weird things happen as the Paint messages are floating around the windows being destructed. Avoid the Paint messages by hiding the main window. Also the application closes much faster without these unnecessary screen refreshes. In addition, there were some crashes due to the Paint events sent to already destructed windows. --- src/slic3r/GUI/MainFrame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 4ded9b1ff..d69480b28 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -96,6 +96,12 @@ wxFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAUL return; } + // Weird things happen as the Paint messages are floating around the windows being destructed. + // Avoid the Paint messages by hiding the main window. + // Also the application closes much faster without these unnecessary screen refreshes. + // In addition, there were some crashes due to the Paint events sent to already destructed windows. + this->Show(false); + // 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. wxGetApp().app_config->save();