Skip to content

Commit 55e3409

Browse files
committed
attribute table: NULL values are considered less than other values (fixes #6715)
1 parent eb9af3e commit 55e3409

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gui/attributetable/qgsattributetableidcolumnpair.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ bool QgsAttributeTableIdColumnPair::operator<( const QgsAttributeTableIdColumnPa
2424
//QVariant thinks gid is a string!
2525
QVariant::Type columnType = mItem.type();
2626

27+
if ( mItem.isNull() )
28+
return 1;
29+
30+
if ( b.mItem.isNull() )
31+
return 0;
32+
2733
switch ( columnType )
2834
{
2935
case QVariant::Int:

0 commit comments

Comments
 (0)