Skip to content

Commit

Permalink
[processing] some refactoring as suggested by Nathan Woodrow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 6, 2014
1 parent 2fc5c01 commit d1a3508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/FieldsCalculator.py
Expand Up @@ -120,7 +120,8 @@ def processAlgorithm(self, progress):
total = 100.0 / len(features)

rownum = 1
for f in features:
for current, f in enumerate(features):
rownum = current + 1
exp.setCurrentRowNumber(rownum)
value = exp.evaluate(f)
if exp.hasEvalError():
Expand All @@ -134,7 +135,6 @@ def processAlgorithm(self, progress):
outFeature[fieldName] = value
writer.addFeature(outFeature)

current += 1
progress.setPercentage(int(current * total))
del writer

Expand Down

0 comments on commit d1a3508

Please sign in to comment.