Skip to content
Permalink
Browse files

Fixed point pattern fill usedAttributes(), fixes #7736

  • Loading branch information
blazek committed Jan 26, 2014
1 parent 742f49f commit 3c5c7de3023c9ec2e9daa4d74b4846fd3e35caad
Showing with 16 additions and 1 deletion.
  1. +14 −1 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
  2. +2 −0 src/core/symbology-ng/qgsfillsymbollayerv2.h
@@ -2294,10 +2294,14 @@ void QgsPointPatternFillSymbolLayer::applyDataDefinedSettings( const QgsSymbolV2
QgsExpression* distanceYExpression = expression( "distance_y" );
QgsExpression* displacementXExpression = expression( "displacement_x" );
QgsExpression* displacementYExpression = expression( "displacement_y" );

#if 0
// TODO: enable but check also if mMarkerSymbol has data defined properties
if ( !distanceXExpression && !distanceYExpression && !displacementXExpression && !displacementYExpression )
{
return;
}
#endif

double distanceX = mDistanceX;
if ( distanceXExpression )
@@ -2322,12 +2326,21 @@ void QgsPointPatternFillSymbolLayer::applyDataDefinedSettings( const QgsSymbolV2
applyPattern( context, mBrush, distanceX, distanceY, displacementX, displacementY );
}


double QgsPointPatternFillSymbolLayer::estimateMaxBleed() const
{
return 0;
}

QSet<QString> QgsPointPatternFillSymbolLayer::usedAttributes() const
{
QSet<QString> attributes = QgsSymbolLayerV2::usedAttributes();

if ( mMarkerSymbol )
attributes.unite( mMarkerSymbol->usedAttributes() );

return attributes;
}

//////////////


@@ -516,6 +516,8 @@ class CORE_EXPORT QgsPointPatternFillSymbolLayer: public QgsImageFillSymbolLayer
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

virtual QSet<QString> usedAttributes() const;

protected:
QgsMarkerSymbolV2* mMarkerSymbol;
double mDistanceX;

1 comment on commit 3c5c7de

@pcav

This comment has been minimized.

Copy link
Member

pcav commented on 3c5c7de Mar 7, 2014

Work done for Regione Toscana - SITA (CIG ZB10C90E5A)

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