Skip to content

Commit

Permalink
layout
Browse files Browse the repository at this point in the history
  • Loading branch information
roya0045 committed Dec 8, 2021
1 parent ac7528a commit 75f1b37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -5479,11 +5479,11 @@ static QVariant fcnGetFeature( const QVariantList &values, const QgsExpressionCo
QString cacheValueKey;
if ( values.size() == 2 && values.at( 1 ).canConvert<QVariantMap>() )
{
QVariantMap map= values.at( 1 ).toMap();
QVariantMap map = values.at( 1 ).toMap();

QMap <QString, QVariant>::const_iterator i = map.constBegin();
QString filterString;
for ( ; i != map.constEnd(); ++i )
for ( ; i != map.constEnd(); ++i )
{
if ( !filterString.isEmpty() )
{
Expand All @@ -5492,8 +5492,7 @@ static QVariant fcnGetFeature( const QVariantList &values, const QgsExpressionCo
filterString.append( QStringLiteral( "( %1 = %2 )" ).arg( QgsExpression::quotedColumnRef( i.key() ),
QgsExpression::quotedString( i.value().toString() ) ) );
}
cacheValueKey = QStringLiteral( "getfeature:%1:%2" ).arg( featureSource->id(),
filterString );
cacheValueKey = QStringLiteral( "getfeature:%1:%2" ).arg( featureSource->id(), filterString );
if ( context && context->hasCachedValue( cacheValueKey ) )
{
return context->cachedValue( cacheValueKey );
Expand Down

0 comments on commit 75f1b37

Please sign in to comment.