Skip to content

Commit

Permalink
Ensure start/stopFeatureRender is passed onto subsymbols
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 31, 2021
1 parent 718a0ee commit f6b4717
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/core/symbology/qgssymbol.h
Expand Up @@ -767,6 +767,8 @@ class CORE_EXPORT QgsSymbol
*/
void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

friend class QgsSymbolLayer;

Q_DISABLE_COPY( QgsSymbol )

};
Expand Down
10 changes: 6 additions & 4 deletions src/core/symbology/qgssymbollayer.cpp
Expand Up @@ -118,14 +118,16 @@ void QgsSymbolLayer::setDataDefinedProperty( QgsSymbolLayer::Property key, const
dataDefinedProperties().setProperty( key, property );
}

void QgsSymbolLayer::startFeatureRender( const QgsFeature &, QgsRenderContext & )
void QgsSymbolLayer::startFeatureRender( const QgsFeature &feature, QgsRenderContext &context )
{

if ( subSymbol() )
subSymbol()->startFeatureRender( feature, context );
}

void QgsSymbolLayer::stopFeatureRender( const QgsFeature &, QgsRenderContext & )
void QgsSymbolLayer::stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context )
{

if ( subSymbol() )
subSymbol()->stopFeatureRender( feature, context );
}

bool QgsSymbolLayer::writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift ) const
Expand Down

0 comments on commit f6b4717

Please sign in to comment.