mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-25 21:59:30 +01:00
Stats: sort by ranking when the table is flipped
This commit is contained in:
parent
579106828c
commit
bbcb79625d
1 changed files with 5 additions and 0 deletions
|
@ -474,8 +474,13 @@ void StatsWidget::flipTable()
|
|||
else
|
||||
{
|
||||
QSortFilterProxyModel *proxy = new QSortFilterProxyModel;
|
||||
proxy->setDynamicSortFilter(true);
|
||||
proxy->setSourceModel(m_flippedModel);
|
||||
m_table->setModel(proxy);
|
||||
// Sort by ranking (last column)
|
||||
const int col = m_flippedModel->columnCount() - 1;
|
||||
m_table->sortByColumn(col);
|
||||
m_table->horizontalHeader()->setSortIndicator(col, Qt::AscendingOrder);
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue