mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Initialize locale before wxTranslations::Get()
This fixes a crash similar to <https://github.com/prusa3d/PrusaSlicer/issues/8299>.
This commit is contained in:
parent
2bca1fc9f3
commit
693af0c98f
1 changed files with 1 additions and 0 deletions
|
@ -4766,6 +4766,7 @@ bool GUI_App::load_language(wxString language, bool initial)
|
|||
{
|
||||
// Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance.
|
||||
wxLocale temp_locale;
|
||||
temp_locale.Init();
|
||||
// Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code).
|
||||
wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT);
|
||||
// Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue