Skip to content
Permalink
Browse files

[processing] add cancellation support where possible

  • Loading branch information
alexbruy committed Jul 17, 2017
1 parent 5af177e commit 95de3a414a96975ea778c1646acdd435229b2683
@@ -237,6 +237,9 @@ def processAlgorithm(self, parameters, context, feedback):

total = 100.0 / source.featureCount() if source.featureCount() else 1
for i in range(1, count + 1):
if feedback.isCanceled():
break

idxStart = graph.findVertex(snappedPoints[i])
tree, cost = QgsGraphAnalyzer.dijkstra(graph, idxStart, 0)

@@ -238,6 +238,9 @@ def processAlgorithm(self, parameters, context, feedback):

total = 100.0 / source.featureCount() if source.featureCount() else 1
for i in range(1, count + 1):
if feedback.isCanceled():
break

idxEnd = graph.findVertex(snappedPoints[i])

if tree[idxEnd] == -1:

0 comments on commit 95de3a4

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