|
@@ -2882,7 +2882,11 @@ QVariant QgsVectorLayer::minimumValue( int index ) |
|
|
else if ( origin == QgsFields::OriginEdit || origin == QgsFields::OriginExpression ) |
|
|
{ |
|
|
// the layer is editable, but in certain cases it can still be avoided going through all features |
|
|
if ( mEditBuffer->mDeletedFeatureIds.isEmpty() && mEditBuffer->mAddedFeatures.isEmpty() && !mEditBuffer->mDeletedAttributeIds.contains( index ) && mEditBuffer->mChangedAttributeValues.isEmpty() ) |
|
|
if ( origin == QgsFields::OriginEdit && |
|
|
mEditBuffer->mDeletedFeatureIds.isEmpty() && |
|
|
mEditBuffer->mAddedFeatures.isEmpty() && ! |
|
|
mEditBuffer->mDeletedAttributeIds.contains( index ) && |
|
|
mEditBuffer->mChangedAttributeValues.isEmpty() ) |
|
|
{ |
|
|
return mDataProvider->minimumValue( index ); |
|
|
} |
|
@@ -2937,10 +2941,11 @@ QVariant QgsVectorLayer::maximumValue( int index ) |
|
|
|
|
|
return vl->maximumValue( sourceLayerIndex ); |
|
|
} |
|
|
else if ( origin == QgsFields::OriginEdit ) |
|
|
else if ( origin == QgsFields::OriginEdit || origin == QgsFields::OriginExpression ) |
|
|
{ |
|
|
// the layer is editable, but in certain cases it can still be avoided going through all features |
|
|
if ( mEditBuffer->mDeletedFeatureIds.isEmpty() && |
|
|
if ( origin == QgsFields::OriginEdit && |
|
|
mEditBuffer->mDeletedFeatureIds.isEmpty() && |
|
|
mEditBuffer->mAddedFeatures.isEmpty() && |
|
|
!mEditBuffer->mDeletedAttributeIds.contains( index ) && |
|
|
mEditBuffer->mChangedAttributeValues.isEmpty() ) |
|
|