Qt: fix game list refresh order when changing the language

This commit is contained in:
Megamouse 2025-12-03 20:39:22 +01:00
parent fa23813081
commit 2f2e82394b

View file

@ -2340,6 +2340,12 @@ void main_window::RetranslateUI(const QStringList& language_codes, const QString
ui->retranslateUi(this); ui->retranslateUi(this);
// Refresh game list first to prevent localization mismatches in further Refresh calls
if (m_game_list_frame)
{
m_game_list_frame->Refresh(true);
}
// Update menu bar size (needed if the corner widget changes its size) // Update menu bar size (needed if the corner widget changes its size)
ui->menuBar->adjustSize(); ui->menuBar->adjustSize();
@ -2354,11 +2360,6 @@ void main_window::RetranslateUI(const QStringList& language_codes, const QString
default: break; default: break;
} }
if (m_game_list_frame)
{
m_game_list_frame->Refresh(true);
}
Q_EMIT RequestDialogRepaint(); Q_EMIT RequestDialogRepaint();
} }