Skip to content

Commit

Permalink
Data defined must reprepare expression if expression changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 4, 2014
1 parent 12f5269 commit c7175cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/core/qgsdatadefined.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdatadefined.h
Expand Up @@ -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; }
Expand Down

0 comments on commit c7175cf

Please sign in to comment.