mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
Fix attributes from some symbols were not available for data defined
symbology (line marker, line pattern)
This commit is contained in:
parent
bbb1c4a2a5
commit
c5b04efadb
@ -759,6 +759,8 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
|
||||
bool setSubSymbol( QgsSymbolV2* symbol );
|
||||
QgsSymbolV2* subSymbol();
|
||||
|
||||
QSet<QString> usedAttributes() const;
|
||||
|
||||
};
|
||||
|
||||
class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer
|
||||
|
||||
@ -207,6 +207,8 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
|
||||
void setMapUnitScale( const QgsMapUnitScale& scale );
|
||||
QgsMapUnitScale mapUnitScale() const;
|
||||
|
||||
QSet<QString> usedAttributes() const;
|
||||
|
||||
protected:
|
||||
|
||||
void renderPolylineInterval( const QPolygonF& points, QgsSymbolV2RenderContext& context );
|
||||
|
||||
@ -2284,6 +2284,14 @@ QgsSymbolV2* QgsLinePatternFillSymbolLayer::subSymbol()
|
||||
return mFillLineSymbol;
|
||||
}
|
||||
|
||||
QSet<QString> QgsLinePatternFillSymbolLayer::usedAttributes() const
|
||||
{
|
||||
QSet<QString> attr = QgsFillSymbolLayerV2::usedAttributes();
|
||||
if ( mFillLineSymbol )
|
||||
attr.unite( mFillLineSymbol->usedAttributes() );
|
||||
return attr;
|
||||
}
|
||||
|
||||
double QgsLinePatternFillSymbolLayer::estimateMaxBleed() const
|
||||
{
|
||||
return 0;
|
||||
|
||||
@ -925,6 +925,8 @@ class CORE_EXPORT QgsLinePatternFillSymbolLayer: public QgsImageFillSymbolLayer
|
||||
bool setSubSymbol( QgsSymbolV2* symbol ) override;
|
||||
QgsSymbolV2* subSymbol() override;
|
||||
|
||||
QSet<QString> usedAttributes() const override;
|
||||
|
||||
protected:
|
||||
/**Distance (in mm or map units) between lines*/
|
||||
double mDistance;
|
||||
|
||||
@ -1469,6 +1469,14 @@ QgsMapUnitScale QgsMarkerLineSymbolLayerV2::mapUnitScale() const
|
||||
return QgsMapUnitScale();
|
||||
}
|
||||
|
||||
QSet<QString> QgsMarkerLineSymbolLayerV2::usedAttributes() const
|
||||
{
|
||||
QSet<QString> attr = QgsLineSymbolLayerV2::usedAttributes();
|
||||
if ( mMarker )
|
||||
attr.unite( mMarker->usedAttributes() );
|
||||
return attr;
|
||||
}
|
||||
|
||||
double QgsMarkerLineSymbolLayerV2::estimateMaxBleed() const
|
||||
{
|
||||
return ( mMarker->size() / 2.0 ) + mOffset;
|
||||
|
||||
@ -256,6 +256,8 @@ class CORE_EXPORT QgsMarkerLineSymbolLayerV2 : public QgsLineSymbolLayerV2
|
||||
void setMapUnitScale( const QgsMapUnitScale& scale ) override;
|
||||
QgsMapUnitScale mapUnitScale() const override;
|
||||
|
||||
QSet<QString> usedAttributes() const override;
|
||||
|
||||
protected:
|
||||
|
||||
void renderPolylineInterval( const QPolygonF& points, QgsSymbolV2RenderContext& context );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user