Skip to content

Commit

Permalink
Fix infinite progress when an algorithm could not be created
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 20, 2019
1 parent 979adbb commit 7acfefa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/processing/gui/AlgorithmDialog.py
Expand Up @@ -263,8 +263,11 @@ def on_complete(ok, results):
self.showLog()

task = QgsProcessingAlgRunnerTask(self.algorithm(), parameters, self.context, self.feedback)
task.executed.connect(on_complete)
self.setCurrentTask(task)
if task.isCanceled():
on_complete(False, {})
else:
task.executed.connect(on_complete)
self.setCurrentTask(task)
else:
self.proxy_progress = QgsProxyProgressTask(QCoreApplication.translate("AlgorithmDialog", "Executing “{}”").format(self.algorithm().displayName()))
QgsApplication.taskManager().addTask(self.proxy_progress)
Expand Down

0 comments on commit 7acfefa

Please sign in to comment.