Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
also update usedAttributes with attributes used in SVG parameters
- Loading branch information
|
@@ -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: |
|
|
|
|
|
/** |
|
|