mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
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.)
This commit is contained in:
parent
553090b17a
commit
93ee06247d
@ -155,8 +155,10 @@ class RegularPoints(QgisAlgorithm):
|
|||||||
f.setGeometry(geom)
|
f.setGeometry(geom)
|
||||||
sink.addFeature(f, QgsFeatureSink.FastInsert)
|
sink.addFeature(f, QgsFeatureSink.FastInsert)
|
||||||
x += pSpacing
|
x += pSpacing
|
||||||
count += 1
|
|
||||||
feedback.setProgress(int(count * total))
|
count += 1
|
||||||
|
feedback.setProgress(int(count * total))
|
||||||
|
|
||||||
y = y - pSpacing
|
y = y - pSpacing
|
||||||
|
|
||||||
return {self.OUTPUT: dest_id}
|
return {self.OUTPUT: dest_id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user