Skip to content
Browse files

Use progress in ConcaveHull when using runalg

Use the progress parameter when using runalg on other algorithms.
Otherwise those algorithms may try to report progress and cause a crash,
for example if ConcaveHull is called from a plugin from a thread other
than the UI thread.
  • Loading branch information
ebrelsford authored and m-kuhn committed Aug 29, 2017
1 parent fea9e92 commit 3e587bc541993b3f62e6e298e1184768148d8bdd
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/processing/algs/qgis/
@@ -66,7 +66,8 @@ def processAlgorithm(self, progress):

# Delaunay triangulation from input point layer
progress.setText('Creating Delaunay triangles...'))
delone_triangles = processing.runalg("qgis:delaunaytriangulation", layer, None)['OUTPUT']
delone_triangles = processing.runalg("qgis:delaunaytriangulation",
layer, None, progress=progress)['OUTPUT']
delaunay_layer = processing.getObject(delone_triangles)

# Get max edge length from Delaunay triangles
@@ -103,7 +104,7 @@ def processAlgorithm(self, progress):
# Dissolve all Delaunay triangles
progress.setText('Dissolving Delaunay triangles...'))
dissolved = processing.runalg("qgis:dissolve", delaunay_layer,
True, None, None)['OUTPUT']
True, None, None, progress=progress)['OUTPUT']
dissolved_layer = processing.getObject(dissolved)

# Save result

0 comments on commit 3e587bc

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