Use the displayed text for sorting GameListItemPath.
By default, DisplayRole is used as the SortRole. This behaviour is what's expected by the user. Made it so that an access to SortRole is equivalent to one to DisplayRole. Also fixes a bug with directory sorting.
This commit is contained in:
parent
acf1fe5ee1
commit
476dcb1915
2 changed files with 18 additions and 7 deletions
|
@ -294,7 +294,7 @@ GameList::GameList(GMainWindow* parent) : QWidget{parent} {
|
|||
item_model->setHeaderData(COLUMN_REGION, Qt::Horizontal, tr("Region"));
|
||||
item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, tr("File type"));
|
||||
item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, tr("Size"));
|
||||
item_model->setSortRole(GameListItemPath::TitleRole);
|
||||
item_model->setSortRole(GameListItemPath::SortRole);
|
||||
|
||||
connect(main_window, &GMainWindow::UpdateThemedIcons, this, &GameList::onUpdateThemedIcons);
|
||||
connect(tree_view, &QTreeView::activated, this, &GameList::ValidateEntry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue