Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Small optimisation to data defined symbology
- Loading branch information
Showing
with
6 additions
and
0 deletions.
-
+6
−0
src/core/symbology-ng/qgssymbollayerv2.cpp
|
@@ -38,6 +38,9 @@ const QgsExpression* QgsSymbolLayerV2::dataDefinedProperty( const QString& prope |
|
|
|
|
|
QgsDataDefined *QgsSymbolLayerV2::getDataDefinedProperty( const QString &property ) const |
|
|
{ |
|
|
if ( mDataDefinedProperties.isEmpty() ) |
|
|
return 0; |
|
|
|
|
|
QMap< QString, QgsDataDefined* >::const_iterator it = mDataDefinedProperties.find( property ); |
|
|
if ( it != mDataDefinedProperties.constEnd() ) |
|
|
{ |
|
@@ -106,6 +109,9 @@ bool QgsSymbolLayerV2::hasDataDefinedProperties() const |
|
|
|
|
|
bool QgsSymbolLayerV2::hasDataDefinedProperty( const QString& property ) const |
|
|
{ |
|
|
if ( mDataDefinedProperties.isEmpty() ) |
|
|
return false; |
|
|
|
|
|
QgsDataDefined* dd = getDataDefinedProperty( property ); |
|
|
return dd && dd->isActive(); |
|
|
} |
|
|