Gui: fix some weird behavior of number format option

This commit is contained in:
0penBrain
2022-03-21 20:20:55 +01:00
committed by wwmayer
parent 9e669aec10
commit 9e7d9283aa

View File

@@ -258,6 +258,10 @@ bool Translator::setLocale(const std::string& language) const
if (!bcp47.empty())
loc = QLocale(QString::fromStdString(bcp47));
QLocale::setDefault(loc);
// Need to manually send the event so locale change is fully took into account on widgets
auto ev = QEvent(QEvent::LocaleChange);
qApp->sendEvent(qApp, &ev);
#ifdef FC_DEBUG
Base::Console().Log("Locale changed to %s => %s\n", qPrintable(loc.bcp47Name()), qPrintable(loc.name()));
#endif