mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Fixed bug in CListModelBase, avoid double sorting
This commit is contained in:
@@ -172,14 +172,15 @@ namespace BlackGui
|
||||
*/
|
||||
template <typename ObjectType, typename ContainerType> void CListModelBase<ObjectType, ContainerType>::sort(int column, Qt::SortOrder order)
|
||||
{
|
||||
if (column == this->m_sortedColumn && order == this->m_sortOrder) { return; }
|
||||
|
||||
// new order
|
||||
this->m_sortedColumn = column;
|
||||
this->m_sortOrder = order;
|
||||
this->m_sortOrder = order;
|
||||
if (this->m_container.size() < 2) return; // nothing to do
|
||||
|
||||
// sort the values
|
||||
this->update(
|
||||
this->sortListByColumn(this->m_container, column, order)
|
||||
);
|
||||
this->update(this->m_container, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user