Showing with 1 addition and 2 deletions.
  1. +1 −2 src/app/qgsfieldcalculator.cpp
3 changes: 1 addition & 2 deletions src/app/qgsfieldcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ void QgsFieldCalculator::accept()

QString calcString = builder->expressionText();
QgsExpression exp( calcString );
exp.setGeomCalculator( myDa );

if ( !mVectorLayer || !mVectorLayer->isEditable() )
return;
Expand Down Expand Up @@ -173,8 +174,6 @@ void QgsFieldCalculator::accept()
}

exp.setCurrentRowNumber( rownum );
exp.setGeomCalculator( myDa );

QVariant value = exp.evaluate( &feature );
if ( exp.hasEvalError() )
{
Expand Down