Skip to content

Commit

Permalink
changed batch process behaviour when there are html outputs
Browse files Browse the repository at this point in the history
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 3e77423
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sextante/gui/BatchProcessingDialog.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 3e77423

Please sign in to comment.