Skip to content
Permalink
Browse files
Small optimisation to data defined symbology
  • Loading branch information
nyalldawson committed May 22, 2015
1 parent b148968 commit e5fcbc39d3a12bcbd51c7c5c0a507065f8084257
Showing with 6 additions and 0 deletions.
  1. +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();
}

0 comments on commit e5fcbc3

Please sign in to comment.