"Po přepnutí do češtiny program zhavaruje a nejde znovu spustit"
Fixed wxWidgets assert, where the Win32 decimal point was different
from wxWidgets locales decimal point.
Fixed by calling the Win32 "set locale" function directly.
Not sure I know what I am doing, this fix needs to be tested throughly.
This commit is contained in:
bubnikv 2019-01-02 15:35:40 +01:00
parent 6e2ea18b9c
commit a7d8146198

View file

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