Follow-up 6d2efe29a4 - Call wxInitAllImageHandlers() before any UI actions to avoid "No image handler..." warnings.

+ Deleted unnecessary app_config->save() call
This commit is contained in:
YuSanka 2021-12-14 14:56:07 +01:00
parent 08402abf2b
commit e2ac37e717

View file

@ -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);