Skip to content

Commit 93ee062

Browse files
jfeldsteinnyalldawson
authored andcommitted
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.)
1 parent 553090b commit 93ee062

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/plugins/processing/algs/qgis/RegularPoints.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ def processAlgorithm(self, parameters, context, feedback):
155155
f.setGeometry(geom)
156156
sink.addFeature(f, QgsFeatureSink.FastInsert)
157157
x += pSpacing
158-
count += 1
159-
feedback.setProgress(int(count * total))
158+
159+
count += 1
160+
feedback.setProgress(int(count * total))
161+
160162
y = y - pSpacing
161163

162164
return {self.OUTPUT: dest_id}

0 commit comments

Comments
 (0)