We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6659f22 commit 16f1504Copy full SHA for 16f1504
src/core/qgsfeaturesource.cpp
@@ -59,7 +59,7 @@ QVariant QgsFeatureSource::minimumValue( int fieldIndex ) const
59
while ( it.nextFeature( f ) )
60
{
61
QVariant v = f.attribute( fieldIndex );
62
- if ( v.isValid() && qgsVariantLessThan( v, min ) )
+ if ( !v.isNull() && ( qgsVariantLessThan( v, min ) || min.isNull() ) )
63
64
min = v;
65
}
@@ -82,7 +82,7 @@ QVariant QgsFeatureSource::maximumValue( int fieldIndex ) const
82
83
84
85
- if ( v.isValid() && qgsVariantGreaterThan( v, max ) )
+ if ( !v.isNull() && ( qgsVariantGreaterThan( v, max ) || max.isNull() ) )
86
87
max = v;
88
0 commit comments