Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Small optimisation to data defined symbology
  • Loading branch information
nyalldawson committed May 22, 2015
1 parent b148968 commit e5fcbc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/symbology-ng/qgssymbollayerv2.cpp
Expand Up @@ -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() )
{
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit e5fcbc3

Please sign in to comment.