Skip to content

Commit 671850f

Browse files
committedJun 13, 2016
Fix sorting in attribute table
Regression introduced with 3ec3dae (2.14.3) where QgsAttributeTableModel::data(index, SortRole) returned an empty variant. Fixes #14927
1 parent 69e3c6f commit 671850f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/gui/attributetable/qgsattributetablemodel.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
593593
val = mFeat.attribute( fieldId );
594594
}
595595

596+
if ( role == SortRole )
597+
{
598+
return val;
599+
}
600+
596601
switch ( role )
597602
{
598603
case Qt::DisplayRole:

0 commit comments

Comments
 (0)