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 ac28714a40efc066279587a7d169470c39a4d119
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/symbology/qgspointdistancerenderer.cpp
@@ -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.
You can’t perform that action at this time.