Skip to content

Commit

Permalink
[BUGFIX] Filter Legend By Map Content doesn't maintain point displace…
Browse files Browse the repository at this point in the history
…ment legend

Fixed #11572
Manually cherry-picked 4d71cf9
  • Loading branch information
rldhont committed Nov 30, 2016
1 parent 84d2c3c commit 499ae31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/symbology-ng/qgspointdisplacementrenderer.cpp
Expand Up @@ -331,6 +331,13 @@ QgsSymbolV2List QgsPointDisplacementRenderer::originalSymbolsForFeature( QgsFeat
return mRenderer->originalSymbolsForFeature( feat, context );
}

QSet< QString > QgsPointDisplacementRenderer::legendKeysForFeature( QgsFeature& feat, QgsRenderContext& context )
{
if ( !mRenderer )
return QSet< QString >() << QString();
return mRenderer->legendKeysForFeature( feat, context );
}

bool QgsPointDisplacementRenderer::willRenderFeature( QgsFeature& feat, QgsRenderContext& context )
{
if ( !mRenderer )
Expand Down
4 changes: 4 additions & 0 deletions src/core/symbology-ng/qgspointdisplacementrenderer.h
Expand Up @@ -79,6 +79,10 @@ class CORE_EXPORT QgsPointDisplacementRenderer: public QgsFeatureRendererV2
@note available in python as originalSymbolsForFeature2
*/
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) override;
/** Returns which legend keys match the feature
* @note added in QGIS 2.18.2
*/
virtual QSet< QString > legendKeysForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
/** Proxy that will call this method on the embedded renderer.
@note available in python as willRenderFeature2
*/
Expand Down

0 comments on commit 499ae31

Please sign in to comment.