mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[Client] Restore language switching in SettingsView
Deleting DlgSettings removed its updateLanguage hook, the only langChanged handler that swapped the QTranslator. SettingsView takes it over so picking a language applies immediately.
This commit is contained in:
parent
ecb77e631e
commit
41f01ff4a9
1 changed files with 3 additions and 3 deletions
|
|
@ -92,9 +92,9 @@ static QStringList pageIconResources()
|
|||
|
||||
SettingsView::SettingsView(QWidget *parent) : QWidget(parent), currentTabIndex(0), searchActive(false)
|
||||
{
|
||||
// Swap the QTranslator before retranslating (was DlgSettings::updateLanguage): without this, picking a new
|
||||
// language only stores the setting and every retranslateUi re-runs against the old translator until restart.
|
||||
// Connected before setupUi() so the swap runs before the pages' own langChanged handlers below.
|
||||
// Swap the QTranslator before retranslating (was DlgSettings::updateLanguage, removed with the dialog):
|
||||
// without this, picking a new language only stores the setting and every retranslateUi re-runs against the
|
||||
// old translator until restart. Connected before setupUi() so the swap runs before the pages' own handlers.
|
||||
connect(&SettingsCache::instance().personal(), &PersonalSettings::langChanged, this, &SettingsView::updateLanguage);
|
||||
setupUi();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue