From c99de065f7717e4d7d1182cd3d0a89af389700aa Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 26 May 2022 10:11:49 +0200 Subject: [PATCH] Fix of #8299 (Linux crash when selecting locales) --- src/slic3r/GUI/GUI_App.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 58498f371..7b2611723 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1962,15 +1962,17 @@ static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguage }), locales.end()); - // Is there a candidate matching a country code of a system language? Move it to the end, - // while maintaining the order of matches, so that the best match ends up at the very end. - std::string system_country = "_" + into_u8(system_language->CanonicalName.AfterFirst('_')).substr(0, 2); - int cnt = locales.size(); - for (int i=0; iCanonicalName.AfterFirst('_')).substr(0, 2); + int cnt = locales.size(); + for (int i=0; i