Skip to content
Permalink
Browse files

also update usedAttributes with attributes used in SVG parameters

  • Loading branch information
3nids committed Jan 6, 2021
1 parent 130cbae commit 98d1be22f21390e3353e22a6b27dc712ae6ed22f
@@ -708,6 +708,9 @@ Returns the units for the stroke width.
virtual void prepareExpressions( const QgsSymbolRenderContext &context );


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


protected:

double calculateAspectRatio( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedAspectRatio ) const;
@@ -3548,3 +3548,15 @@ void QgsSvgMarkerSymbolLayer::prepareExpressions( const QgsSymbolRenderContext &

QgsMarkerSymbolLayer::prepareExpressions( context );
}


QSet<QString> QgsSvgMarkerSymbolLayer::usedAttributes( const QgsRenderContext &context ) const
{
QSet<QString> attrs = QgsMarkerSymbolLayer::usedAttributes( context );

QMap<QString, QgsProperty>::const_iterator it = mParameters.constBegin();
for ( ; it != mParameters.constEnd(); ++it )
attrs.unite( it.value().referencedFields( context.expressionContext() ) );

return attrs;
}
@@ -629,6 +629,8 @@ class CORE_EXPORT QgsSvgMarkerSymbolLayer : public QgsMarkerSymbolLayer

void prepareExpressions( const QgsSymbolRenderContext &context ) override;

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

protected:

/**

0 comments on commit 98d1be2

Please sign in to comment.
You can’t perform that action at this time.