Skip to content
Permalink
Browse files

Rename count to __count

  • Loading branch information
m-kuhn authored and nyalldawson committed Sep 14, 2020
1 parent d2c60cc commit d41e8e1d400e44d6aa892bacff39ecc9304fc37c
@@ -207,7 +207,7 @@ def execute_in_place_run(alg, parameters, context=None, feedback=None, raise_exc

feedback.setProgress(int((current + 1) * step))

results, ok = {'count': current + 1}, True
results, ok = {'__count': current + 1}, True

else: # Traditional 'run' with delete and add features cycle

@@ -246,7 +246,7 @@ def execute_in_place_run(alg, parameters, context=None, feedback=None, raise_exc
raise QgsProcessingException(tr("Error adding processed features back into the layer."))
new_ids = set([f.id() for f in active_layer.getFeatures(req)])
new_feature_ids += list(new_ids - old_ids)
results['count'] = len(new_feature_ids)
results['__count'] = len(new_feature_ids)

active_layer.endEditCommand()

@@ -253,7 +253,7 @@ def executeAlgorithm(self):
feedback = MessageBarProgress(algname=alg.displayName())
ok, results = execute_in_place(alg, parameters, feedback=feedback)
if ok:
iface.messageBar().pushSuccess('', self.tr('{algname} completed. %n feature(s) processed.', n=results['count']).format(algname=alg.displayName()))
iface.messageBar().pushSuccess('', self.tr('{algname} completed. %n feature(s) processed.', n=results['__count']).format(algname=alg.displayName()))
feedback.close()
# MessageBarProgress handles errors
return

0 comments on commit d41e8e1

Please sign in to comment.
You can’t perform that action at this time.