Debugger: Use the proper data role for sorting threads

This commit is contained in:
Ty Lamontagne 2023-10-26 19:13:00 -04:00 committed by refractionpcsx2
parent 9eb1731516
commit 692ca763a1
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu)
connect(m_ui.threadList, &QTableView::doubleClicked, this, &CpuWidget::onThreadListDoubleClick);
m_threadProxyModel.setSourceModel(&m_threadModel);
m_threadProxyModel.setSortRole(Qt::UserRole);
m_ui.threadList->setModel(&m_threadProxyModel);
m_ui.threadList->setSortingEnabled(true);
m_ui.threadList->sortByColumn(ThreadModel::ThreadColumns::ID, Qt::SortOrder::AscendingOrder);