Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Microoptimise and avoid cache lookup when no sort order set
- Loading branch information
Showing
with
6 additions
and
0 deletions.
-
+6
−0
src/gui/attributetable/qgsattributetablefiltermodel.cpp
|
@@ -58,6 +58,12 @@ bool QgsAttributeTableFilterModel::lessThan( const QModelIndex &left, const QMod |
|
|
} |
|
|
} |
|
|
|
|
|
if ( mTableModel->sortCacheExpression().isEmpty() ) |
|
|
{ |
|
|
//shortcut when no sort order set |
|
|
return false; |
|
|
} |
|
|
|
|
|
return qgsVariantLessThan( left.data( QgsAttributeTableModel::SortRole ), |
|
|
right.data( QgsAttributeTableModel::SortRole ) ); |
|
|
} |
|
|