Skip to content

Commit 3e587bc

Browse files
ebrelsfordm-kuhn
authored andcommitted
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.
1 parent fea9e92 commit 3e587bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def processAlgorithm(self, progress):
6666

6767
# Delaunay triangulation from input point layer
6868
progress.setText(self.tr('Creating Delaunay triangles...'))
69-
delone_triangles = processing.runalg("qgis:delaunaytriangulation", layer, None)['OUTPUT']
69+
delone_triangles = processing.runalg("qgis:delaunaytriangulation",
70+
layer, None, progress=progress)['OUTPUT']
7071
delaunay_layer = processing.getObject(delone_triangles)
7172

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

109110
# Save result

0 commit comments

Comments
 (0)