Skip to content

Commit

Permalink
Fix data defined properties in cluster/displacement renderer
Browse files Browse the repository at this point in the history
do not evaluate for isolated features

Fixes #18074
  • Loading branch information
nyalldawson committed Feb 12, 2018
1 parent 46d7a42 commit ac28714
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/symbology/qgspointdistancerenderer.cpp
Expand Up @@ -459,6 +459,11 @@ QgsExpressionContextScope *QgsPointDistanceRenderer::createGroupScope( const Clu

clusterScope->addVariable( QgsExpressionContextScope::StaticVariable( QgsExpressionContext::EXPR_CLUSTER_SIZE, group.size(), true ) );
}
if ( !group.empty() )
{
// data defined properties may require a feature in the expression context, so just use first feature in group
clusterScope->setFeature( group.at( 0 ).feature );
}
return clusterScope;
}

Expand Down

0 comments on commit ac28714

Please sign in to comment.