Skip to content

Commit

Permalink
Proxy filterNeedsGeometry for inverted/displacement renderers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 24, 2018
1 parent b5867bf commit 81487f9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Features collected during renderFeature() are rendered using the embedded featur
%Docstring
Proxy that will call this method on the embedded renderer.
%End
virtual bool filterNeedsGeometry() const;

virtual QgsFeatureRenderer::Capabilities capabilities();

%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Constructor for QgsPointDistanceRenderer.

virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;

virtual bool filterNeedsGeometry() const;

virtual QgsFeatureRenderer::Capabilities capabilities();

virtual QgsSymbolList symbols( QgsRenderContext &context ) const;
Expand Down
5 changes: 5 additions & 0 deletions src/core/symbology/qgsinvertedpolygonrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ QSet<QString> QgsInvertedPolygonRenderer::usedAttributes( const QgsRenderContext
return mSubRenderer->usedAttributes( context );
}

bool QgsInvertedPolygonRenderer::filterNeedsGeometry() const
{
return mSubRenderer ? mSubRenderer->filterNeedsGeometry() : false;
}

QgsLegendSymbolList QgsInvertedPolygonRenderer::legendSymbolItems() const
{
if ( !mSubRenderer )
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgsinvertedpolygonrenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRenderer

//! Proxy that will call this method on the embedded renderer.
QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
bool filterNeedsGeometry() const override;
//! Proxy that will call this method on the embedded renderer.
QgsFeatureRenderer::Capabilities capabilities() override;

Expand Down
5 changes: 5 additions & 0 deletions src/core/symbology/qgspointdistancerenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ QSet<QString> QgsPointDistanceRenderer::usedAttributes( const QgsRenderContext &
return attributeList;
}

bool QgsPointDistanceRenderer::filterNeedsGeometry() const
{
return mRenderer ? mRenderer->filterNeedsGeometry() : false;
}

QgsFeatureRenderer::Capabilities QgsPointDistanceRenderer::capabilities()
{
if ( !mRenderer )
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgspointdistancerenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class CORE_EXPORT QgsPointDistanceRenderer: public QgsFeatureRenderer
void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const override;
bool renderFeature( const QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false ) override;
QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
bool filterNeedsGeometry() const override;
QgsFeatureRenderer::Capabilities capabilities() override;
QgsSymbolList symbols( QgsRenderContext &context ) const override;
QgsSymbol *symbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
Expand Down

0 comments on commit 81487f9

Please sign in to comment.