Skip to content
Permalink
Browse files
Data defined must reprepare expression if expression changes
  • Loading branch information
nyalldawson committed Jul 4, 2014
1 parent 12f5269 commit c7175cfa157753721eb49195d6dbe29a30eb3234
Showing with 7 additions and 1 deletion.
  1. +6 −0 src/core/qgsdatadefined.cpp
  2. +1 −1 src/core/qgsdatadefined.h
@@ -39,6 +39,12 @@ QgsDataDefined::~QgsDataDefined()
delete mExpression;
}

void QgsDataDefined::setExpressionString( const QString &expr )
{
mExpressionString = expr;
mExpressionPrepared = false;
}

bool QgsDataDefined::prepareExpression( QgsVectorLayer* layer )
{
if ( !mUseExpression || mExpressionString.isEmpty() )
@@ -54,7 +54,7 @@ class CORE_EXPORT QgsDataDefined
void setUseExpression( bool use ) { mUseExpression = use; }

QString expressionString() const { return mExpressionString; }
void setExpressionString( const QString& expr ) { mExpressionString = expr; }
void setExpressionString( const QString& expr );

// @note not available in python bindings
QMap<QString, QVariant> expressionParams() const { return mExpressionParams; }

0 comments on commit c7175cf

Please sign in to comment.