From 6d2efe29a4ad57f57d19878d64de5acc08827e92 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 14 Dec 2021 14:13:25 +0100 Subject: Localization: Updated dictionaries for CS, DE, ES, FR, IT, NL, PL + GUI_App.cpp: Set language, color mode and initialization of image handlers before a call of check_older_app_config() --- src/slic3r/GUI/GUI_App.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/slic3r/GUI') diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index fe4f15999..6115e4bf8 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -949,9 +949,6 @@ bool GUI_App::check_older_app_config(Semver current_version, bool backup) BOOST_LOG_TRIVIAL(info) << "last app config file used: " << m_older_data_dir_path; // ask about using older data folder - // See GH issue #7469. - wxInitAllImageHandlers(); - InfoDialog msg(nullptr , format_wxstr(_L("You are opening %1% version %2%."), SLIC3R_APP_NAME, SLIC3R_VERSION) , backup ? @@ -1106,6 +1103,19 @@ bool GUI_App::on_init_inner() } } + app_config->save(); + + // Set language, color mode and initialization of image handlers before check_older_app_config() call + + // If load_language() fails, the application closes. + load_language(wxString(), true); +#ifdef _MSW_DARK_MODE + 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); @@ -1116,14 +1126,6 @@ bool GUI_App::on_init_inner() app_config->set("version", SLIC3R_VERSION); app_config->save(); - // If load_language() fails, the application closes. - load_language(wxString(), true); - - wxInitAllImageHandlers(); - -#ifdef _MSW_DARK_MODE - NppDarkMode::InitDarkMode(app_config->get("dark_color_mode") == "1", app_config->get("sys_menu_enabled") == "1"); -#endif SplashScreen* scrn = nullptr; if (app_config->get("show_splash_screen") == "1") { // make a bitmap with dark grey banner on the left side @@ -1147,8 +1149,6 @@ bool GUI_App::on_init_inner() scrn->SetText(_L("Loading configuration")+ dots); } - - preset_bundle = new PresetBundle(); // just checking for existence of Slic3r::data_dir is not enough : it may be an empty directory -- cgit v1.2.3