From e2ac37e7178e994680aaf9e894619c4cfb2e92a0 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 14 Dec 2021 14:56:07 +0100 Subject: [PATCH] Follow-up https://github.com/prusa3d/PrusaSlicer/commit/6d2efe29a4ad57f57d19878d64de5acc08827e92 - Call wxInitAllImageHandlers() before any UI actions to avoid "No image handler..." warnings. + Deleted unnecessary app_config->save() call --- src/slic3r/GUI/GUI_App.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 6115e4bf82..e4078c9c13 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1040,6 +1040,9 @@ bool GUI_App::OnInit() bool GUI_App::on_init_inner() { + // Set initialization of image handlers before any UI actions - See GH issue #7469 + wxInitAllImageHandlers(); + #if defined(_WIN32) && ! defined(_WIN64) // Win32 32bit build. if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") { @@ -1103,9 +1106,7 @@ bool GUI_App::on_init_inner() } } - app_config->save(); - - // Set language, color mode and initialization of image handlers before check_older_app_config() call + // Set language and color mode before check_older_app_config() call // If load_language() fails, the application closes. load_language(wxString(), true); @@ -1113,9 +1114,6 @@ bool GUI_App::on_init_inner() NppDarkMode::InitDarkMode(app_config->get("dark_color_mode") == "1", app_config->get("sys_menu_enabled") == "1"); #endif - // See GH issue #7469 - wxInitAllImageHandlers(); - if (m_last_config_version) { if (*m_last_config_version < *Semver::parse(SLIC3R_VERSION)) check_older_app_config(*m_last_config_version, true);