Merge pull request #6697 from spycrab/qt_sort

Qt/GameList: Sort by title by default
This commit is contained in:
Anthony 2018-04-27 19:30:48 +01:00 committed by GitHub
commit 2b9df8eedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,10 @@ void GameList::MakeListView()
connect(hor_header, &QHeaderView::sectionMoved, this, &GameList::OnHeaderViewChanged);
hor_header->setSectionsMovable(true);
if (!Settings::GetQSettings().contains(QStringLiteral("tableheader/state")))
m_list->sortByColumn(GameListModel::COL_TITLE, Qt::AscendingOrder);
hor_header->restoreState(
Settings::GetQSettings().value(QStringLiteral("tableheader/state")).toByteArray());