From a7d8146198328d1d9c5fcad39c55b6781e789050 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 2 Jan 2019 15:35:40 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20of=20=20#1501=20"Po=20p=C5=99epnut=C3=AD?= =?UTF-8?q?=20do=20=C4=8De=C5=A1tiny=20program=20zhavaruje=20a=20nejde=20z?= =?UTF-8?q?novu=20spustit"=20Fixed=20wxWidgets=20assert,=20where=20the=20W?= =?UTF-8?q?in32=20decimal=20point=20was=20different=20from=20wxWidgets=20l?= =?UTF-8?q?ocales=20decimal=20point.=20Fixed=20by=20calling=20the=20Win32?= =?UTF-8?q?=20"set=20locale"=20function=20directly.=20Not=20sure=20I=20kno?= =?UTF-8?q?w=20what=20I=20am=20doing,=20this=20fix=20needs=20to=20be=20tes?= =?UTF-8?q?ted=20throughly.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slic3r/GUI/GUI_App.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 69b661494..5db2a95cd 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -462,6 +462,9 @@ bool GUI_App::select_language( wxArrayString & names, m_wxLocale->AddCatalogLookupPathPrefix(localization_dir()); m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE"); wxSetlocale(LC_NUMERIC, "C"); +#ifdef WIN32 + ::SetLocaleInfoA(LOCALE_CUSTOM_DEFAULT, LOCALE_SDECIMAL, "."); +#endif /* WIN32 */ Preset::update_suffix_modified(); return true; } @@ -489,7 +492,10 @@ bool GUI_App::load_language() m_wxLocale->AddCatalogLookupPathPrefix(localization_dir()); m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE"); wxSetlocale(LC_NUMERIC, "C"); - Preset::update_suffix_modified(); +#ifdef WIN32 + ::SetLocaleInfoA(LOCALE_CUSTOM_DEFAULT, LOCALE_SDECIMAL, "."); +#endif /* WIN32 */ + Preset::update_suffix_modified(); return true; } }