Skip to content

Commit

Permalink
Also add results to results dock when running through algorithm dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 27, 2017
1 parent 1e5d773 commit 14347a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/plugins/processing/gui/AlgorithmDialog.py
Expand Up @@ -39,6 +39,7 @@
QgsProcessingParameterDefinition,
QgsProcessingOutputRasterLayer,
QgsProcessingOutputVectorLayer,
QgsProcessingOutputHtml,
QgsProcessingParameterVectorOutput,
QgsProcessingOutputLayerDefinition,
QgsProcessingParameterFeatureSink,
Expand All @@ -49,7 +50,7 @@

from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig

from processing.core.ProcessingResults import resultsList
from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.BatchAlgorithmDialog import BatchAlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
Expand Down Expand Up @@ -273,6 +274,12 @@ def finish(self, result, context, feedback):

if self.iterateParam is None:

# add html results to results dock
for out in self.alg.outputDefinitions():
if isinstance(out, QgsProcessingOutputHtml) and out.name() in result and result[out.name()]:
resultsList.addResult(icon=self.alg.icon(), name=out.description(),
result=result[out.name()])

if not handleAlgorithmResults(self.alg, context, feedback, not keepOpen):
self.resetGUI()
return
Expand Down

0 comments on commit 14347a4

Please sign in to comment.