Skip to content

Commit

Permalink
[processing] Batch: ensure correct processing of extent params after …
Browse files Browse the repository at this point in the history
…other params are set
  • Loading branch information
volaya committed Sep 29, 2015
1 parent 67d70f8 commit 8e971c2
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions python/plugins/processing/gui/BatchAlgorithmDialog.py
Expand Up @@ -102,15 +102,28 @@ def accept(self):
for param in alg.parameters:
if param.hidden:
continue

if isinstance(param, ParameterExtent):
col += 1
continue
widget = self.mainWidget.tblParameters.cellWidget(row, col)
if not self.setParamValue(param, widget, alg):
self.lblProgress.setText(
self.tr('<b>Missing parameter value: %s (row %d)</b>') % (param.description, row + 1))
self.algs = None
return
col += 1

col = 0
for param in alg.parameters:
if param.hidden:
continue
if isinstance(param, ParameterExtent):
widget = self.mainWidget.tblParameters.cellWidget(row, col)
if not self.setParamValue(param, widget, alg):
self.lblProgress.setText(
self.tr('<b>Missing parameter value: %s (row %d)</b>') % (param.description, row + 1))
self.algs = None
return
col += 1
for out in alg.outputs:
if out.hidden:
continue
Expand Down Expand Up @@ -145,7 +158,7 @@ def accept(self):
pass

for count, alg in enumerate(self.algs):
self.setText(self.tr('Processing algorithm %d/%d...') % (count + 1, len(self.algs)))
self.setText(self.tr('\nProcessing algorithm %d/%d...') % (count + 1, len(self.algs)))
self.setInfo(self.tr('<b>Algorithm %s starting...</b>' % alg.name))
if runalg(alg, self) and not self.canceled:
if self.load[count]:
Expand All @@ -166,7 +179,7 @@ def finish(self):

self.mainWidget.setEnabled(True)
QMessageBox.information(self, self.tr('Batch processing'),
self.tr('Batch processing successfully completed!'))
self.tr('Batch processing completed'))

def loadHTMLResults(self, alg, num):
for out in alg.outputs:
Expand Down

0 comments on commit 8e971c2

Please sign in to comment.