File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2882,7 +2882,11 @@ QVariant QgsVectorLayer::minimumValue( int index )
2882
2882
else if ( origin == QgsFields::OriginEdit || origin == QgsFields::OriginExpression )
2883
2883
{
2884
2884
// the layer is editable, but in certain cases it can still be avoided going through all features
2885
- if ( mEditBuffer ->mDeletedFeatureIds .isEmpty () && mEditBuffer ->mAddedFeatures .isEmpty () && !mEditBuffer ->mDeletedAttributeIds .contains ( index ) && mEditBuffer ->mChangedAttributeValues .isEmpty () )
2885
+ if ( origin == QgsFields::OriginEdit &&
2886
+ mEditBuffer ->mDeletedFeatureIds .isEmpty () &&
2887
+ mEditBuffer ->mAddedFeatures .isEmpty () && !
2888
+ mEditBuffer ->mDeletedAttributeIds .contains ( index ) &&
2889
+ mEditBuffer ->mChangedAttributeValues .isEmpty () )
2886
2890
{
2887
2891
return mDataProvider ->minimumValue ( index );
2888
2892
}
@@ -2937,10 +2941,11 @@ QVariant QgsVectorLayer::maximumValue( int index )
2937
2941
2938
2942
return vl->maximumValue ( sourceLayerIndex );
2939
2943
}
2940
- else if ( origin == QgsFields::OriginEdit )
2944
+ else if ( origin == QgsFields::OriginEdit || origin == QgsFields::OriginExpression )
2941
2945
{
2942
2946
// the layer is editable, but in certain cases it can still be avoided going through all features
2943
- if ( mEditBuffer ->mDeletedFeatureIds .isEmpty () &&
2947
+ if ( origin == QgsFields::OriginEdit &&
2948
+ mEditBuffer ->mDeletedFeatureIds .isEmpty () &&
2944
2949
mEditBuffer ->mAddedFeatures .isEmpty () &&
2945
2950
!mEditBuffer ->mDeletedAttributeIds .contains ( index ) &&
2946
2951
mEditBuffer ->mChangedAttributeValues .isEmpty () )
You can’t perform that action at this time.
0 commit comments