Skip to content
Permalink
Browse files
Fix data defined properties in cluster/displacement renderer
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.
@@ -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;
}

0 comments on commit ac28714

Please sign in to comment.