Skip to content

Commit 7acfefa

Browse files
committedFeb 20, 2019
Fix infinite progress when an algorithm could not be created
1 parent 979adbb commit 7acfefa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎python/plugins/processing/gui/AlgorithmDialog.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,11 @@ def on_complete(ok, results):
263263
self.showLog()
264264

265265
task = QgsProcessingAlgRunnerTask(self.algorithm(), parameters, self.context, self.feedback)
266-
task.executed.connect(on_complete)
267-
self.setCurrentTask(task)
266+
if task.isCanceled():
267+
on_complete(False, {})
268+
else:
269+
task.executed.connect(on_complete)
270+
self.setCurrentTask(task)
268271
else:
269272
self.proxy_progress = QgsProxyProgressTask(QCoreApplication.translate("AlgorithmDialog", "Executing “{}”").format(self.algorithm().displayName()))
270273
QgsApplication.taskManager().addTask(self.proxy_progress)

0 commit comments

Comments
 (0)
Please sign in to comment.