Qt/GameList: Fix broken File Name column
This commit is contained in:
parent
6db55fc2d0
commit
ca3be07e59
|
@ -484,7 +484,8 @@ void GameList::OnColumnVisibilityToggled(const QString& row, bool visible)
|
|||
{tr("Platform"), GameListModel::COL_PLATFORM},
|
||||
{tr("Size"), GameListModel::COL_SIZE},
|
||||
{tr("Title"), GameListModel::COL_TITLE},
|
||||
{tr("State"), GameListModel::COL_RATING}};
|
||||
{tr("State"), GameListModel::COL_RATING},
|
||||
{tr("File Name"), GameListModel::COL_FILE_NAME}};
|
||||
|
||||
m_list->setColumnHidden(rowname_to_col_index[row], !visible);
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
|
|||
case COL_FILE_NAME:
|
||||
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
|
||||
return game->GetFileName();
|
||||
break;
|
||||
case COL_SIZE:
|
||||
if (role == Qt::DisplayRole)
|
||||
return FormatSize(game->GetFileSize());
|
||||
|
|
Loading…
Reference in New Issue