Skip to content
Browse files
Count and report progress based on expected total
Algorithm appears to freeze without progress while `extent_engine.intersects(geom.constGet())` returns false. 

This keeps the progress bar continuous and smooth, even if the feature ends up not being added.

(noticed this because the algo hangs for 2 mins while processing a large dataset which I think is outside the extent somehow. None of the points going in. No apparent progress.)
  • Loading branch information
jfeldstein authored and nyalldawson committed Aug 15, 2018
1 parent 553090b commit 93ee06247d51f4a9747478d3fe72e661320c5baf
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/plugins/processing/algs/qgis/
@@ -155,8 +155,10 @@ def processAlgorithm(self, parameters, context, feedback):
sink.addFeature(f, QgsFeatureSink.FastInsert)
x += pSpacing
count += 1
feedback.setProgress(int(count * total))

count += 1
feedback.setProgress(int(count * total))

y = y - pSpacing

return {self.OUTPUT: dest_id}

0 comments on commit 93ee062

Please sign in to comment.