Skip to content

Commit

Permalink
Merge pull request #510 from matthias-kuhn/field-calculator-perf
Browse files Browse the repository at this point in the history
[FIX #7533] Field calculator is slow
  • Loading branch information
jef-n committed Apr 8, 2013
2 parents 4306632 + a21fc5a commit a150865
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/qgsfieldcalculator.cpp
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

0 comments on commit a150865

Please sign in to comment.