Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[legends] Fix missing symbols for inverted polygon layers when using
filter by map content

Fixes #22718
  • Loading branch information
nyalldawson committed Sep 20, 2019
1 parent ff4f32d commit abc9f47
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Expand Up @@ -86,6 +86,8 @@ Features collected during renderFeature() are rendered using the embedded featur

virtual QgsSymbolList originalSymbolsForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

virtual QSet< QString > legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const;

virtual QgsLegendSymbolList legendSymbolItems() const;

virtual bool willRenderFeature( const QgsFeature &feature, QgsRenderContext &context ) const;
Expand Down
7 changes: 7 additions & 0 deletions src/core/symbology/qgsinvertedpolygonrenderer.cpp
Expand Up @@ -465,6 +465,13 @@ QgsSymbolList QgsInvertedPolygonRenderer::originalSymbolsForFeature( const QgsFe
return mSubRenderer->originalSymbolsForFeature( feature, context );
}

QSet<QString> QgsInvertedPolygonRenderer::legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const
{
if ( !mSubRenderer )
return QSet<QString>();
return mSubRenderer->legendKeysForFeature( feature, context );
}

QgsSymbolList QgsInvertedPolygonRenderer::symbols( QgsRenderContext &context ) const
{
if ( !mSubRenderer )
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgsinvertedpolygonrenderer.h
Expand Up @@ -84,6 +84,7 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRenderer
QgsSymbol *originalSymbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
QgsSymbolList symbolsForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
QgsSymbolList originalSymbolsForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
QSet< QString > legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
QgsLegendSymbolList legendSymbolItems() const override;
bool willRenderFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;

Expand Down

0 comments on commit abc9f47

Please sign in to comment.