mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-13 05:48:09 +08: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:
parent
6e2ea18b9c
commit
a7d8146198
@ -462,6 +462,9 @@ bool GUI_App::select_language( wxArrayString & names,
|
|||||||
m_wxLocale->AddCatalogLookupPathPrefix(localization_dir());
|
m_wxLocale->AddCatalogLookupPathPrefix(localization_dir());
|
||||||
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE");
|
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE");
|
||||||
wxSetlocale(LC_NUMERIC, "C");
|
wxSetlocale(LC_NUMERIC, "C");
|
||||||
|
#ifdef WIN32
|
||||||
|
::SetLocaleInfoA(LOCALE_CUSTOM_DEFAULT, LOCALE_SDECIMAL, ".");
|
||||||
|
#endif /* WIN32 */
|
||||||
Preset::update_suffix_modified();
|
Preset::update_suffix_modified();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -489,7 +492,10 @@ bool GUI_App::load_language()
|
|||||||
m_wxLocale->AddCatalogLookupPathPrefix(localization_dir());
|
m_wxLocale->AddCatalogLookupPathPrefix(localization_dir());
|
||||||
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE");
|
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3rPE");
|
||||||
wxSetlocale(LC_NUMERIC, "C");
|
wxSetlocale(LC_NUMERIC, "C");
|
||||||
Preset::update_suffix_modified();
|
#ifdef WIN32
|
||||||
|
::SetLocaleInfoA(LOCALE_CUSTOM_DEFAULT, LOCALE_SDECIMAL, ".");
|
||||||
|
#endif /* WIN32 */
|
||||||
|
Preset::update_suffix_modified();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user