Skip to content

Commit c2b8424

Browse files
committed
Always cache values and add fid to feature hash
1 parent f80a33b commit c2b8424

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/qgsexpression.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,7 @@ static QVariant fcnAggregate( const QVariantList& values, const QgsExpressionCon
697697
subContext.appendScope( subScope );
698698
result = vl->aggregate( aggregate, subExpression, parameters, &subContext, &ok );
699699

700-
if ( ok )
701-
context->setCachedValue( cacheKey, result );
700+
context->setCachedValue( cacheKey, result );
702701
}
703702
else
704703
{

src/core/qgsfeature.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ uint qHash( const QgsFeature& key, uint seed )
323323
}
324324

325325
hash ^= qHash( key.geometry().exportToWkt() );
326+
hash ^= qHash( key.id() );
326327

327328
return hash;
328329
}

0 commit comments

Comments
 (0)