Qt: Fix prefer-English-title when changing languages

This commit is contained in:
Stenzek
2023-11-05 13:40:45 +10:00
committed by Connor McLaughlin
parent 2f95dc20c6
commit c62bd4ce97
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -131,6 +131,7 @@ GameListModel::GameListModel(float cover_scale, bool show_cover_titles, QObject*
: QAbstractTableModel(parent)
, m_show_titles_for_covers(show_cover_titles)
{
loadSettings();
loadCommonImages();
setCoverScale(cover_scale);
setColumnDisplayNames();
@@ -424,8 +425,8 @@ QVariant GameListModel::headerData(int section, Qt::Orientation orientation, int
void GameListModel::refresh()
{
m_prefer_english_titles = Host::GetBaseBoolSettingValue("UI", "PreferEnglishGameList", false);
beginResetModel();
loadSettings();
endResetModel();
}
@@ -547,6 +548,11 @@ bool GameListModel::lessThan(const QModelIndex& left_index, const QModelIndex& r
}
}
void GameListModel::loadSettings()
{
m_prefer_english_titles = Host::GetBaseBoolSettingValue("UI", "PreferEnglishGameList", false);
}
QIcon GameListModel::getIconForType(GameList::EntryType type)
{
switch (type)
+1
View File
@@ -87,6 +87,7 @@ Q_SIGNALS:
void coverScaleChanged();
private:
void loadSettings();
void loadCommonImages();
void loadThemeSpecificImages();
void setColumnDisplayNames();