mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-20 07:15:38 +00:00
Qt: Fix incorrect sort indicator on loading
This commit is contained in:
parent
93836636a1
commit
a56ebf24b2
|
@ -640,7 +640,10 @@ void GameListWidget::loadTableViewColumnSortSettings()
|
||||||
.value_or(DEFAULT_SORT_COLUMN);
|
.value_or(DEFAULT_SORT_COLUMN);
|
||||||
const bool sort_descending =
|
const bool sort_descending =
|
||||||
Host::GetBaseBoolSettingValue("GameListTableView", "SortDescending", DEFAULT_SORT_DESCENDING);
|
Host::GetBaseBoolSettingValue("GameListTableView", "SortDescending", DEFAULT_SORT_DESCENDING);
|
||||||
m_sort_model->sort(sort_column, sort_descending ? Qt::DescendingOrder : Qt::AscendingOrder);
|
const Qt::SortOrder sort_order = sort_descending ? Qt::DescendingOrder : Qt::AscendingOrder;
|
||||||
|
m_sort_model->sort(sort_column, sort_order);
|
||||||
|
if (QHeaderView* hv = m_table_view->horizontalHeader())
|
||||||
|
hv->setSortIndicator(sort_column, sort_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListWidget::saveTableViewColumnSortSettings()
|
void GameListWidget::saveTableViewColumnSortSettings()
|
||||||
|
|
Loading…
Reference in a new issue