mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Fix of #1501
"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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user