Skip to content
Permalink
Browse files
changed batch process behaviour when there are html outputs
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@179 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed May 10, 2012
1 parent a8651bc commit 3e774231e96a4e7485f518491f004d7e600ecdcf
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/sextante/gui/BatchProcessingDialog.py
@@ -13,6 +13,9 @@
import copy
from sextante.gui.BatchOutputSelectionPanel import BatchOutputSelectionPanel
from sextante.gui.AlgorithmExecutor import AlgorithmExecutor, SilentProgress
from sextante.outputs.OutputHTML import OutputHTML
from sextante.core.SextanteResults import SextanteResults
from sextante.gui.ResultsDialog import ResultsDialog

class BatchProcessingDialog(QtGui.QDialog):
def __init__(self, alg):
@@ -101,6 +104,7 @@ def okPressed(self):
for alg in self.algs:
if AlgorithmExecutor.runalg(alg, SilentProgress()):
self.progress.setValue(i)
self.loadHTMLResults(alg, i)
i+=1
else:
QApplication.restoreOverrideCursor()
@@ -109,6 +113,12 @@ def okPressed(self):
QMessageBox.information(self, "Batch processing", "Batch processing successfully completed!")
self.close()

def loadHTMLResults(self, alg, i):
for out in alg.outputs:
if out.hidden or not out.open:
continue
if isinstance(out, OutputHTML):
SextanteResults.addResult(out.description + "[" + str(i) + "]", out.value)

def cancelPressed(self):
self.algs = None

0 comments on commit 3e77423

Please sign in to comment.