Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix uniqueValues for virtual field
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+1
−1
src/core/qgsvectorlayer.cpp
|
@@ -2830,7 +2830,7 @@ void QgsVectorLayer::uniqueValues( int index, QList<QVariant> &uniqueValues, int |
|
|
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->uniqueValues( index, uniqueValues, limit ); |
|
|
} |
|
|