Skip to content
Permalink
Browse files
[processing] add information message when feature skipped
  • Loading branch information
alexbruy committed Apr 19, 2017
1 parent 1016119 commit 737906c55cb59e68f43ba3c5c4e1b88dbb154cbf
Showing with 4 additions and 2 deletions.
  1. +2 −1 python/plugins/processing/algs/qgis/RandomPointsPolygonsFixed.py
  2. +2 −1 python/plugins/processing/algs/qgis/RandomPointsPolygonsVariable.py
@@ -102,7 +102,8 @@ def processAlgorithm(self, feedback):
else:
pointCount = int(round(value * da.measureArea(fGeom)))

if strategy == 1 and pointCount == 0:
if pointCount == 0:
feedback.pushInfo("Skip feature {} as number of points for it is 0.")
continue

index = QgsSpatialIndex()
@@ -103,7 +103,8 @@ def processAlgorithm(self, feedback):
else:
pointCount = int(round(f[fieldName] * da.measureArea(fGeom)))

if strategy == 0 and pointCount == 0:
if pointCount == 0:
feedback.pushInfo("Skip feature {} as number of points for it is 0.")
continue

index = QgsSpatialIndex()

0 comments on commit 737906c

Please sign in to comment.