mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] Batch: ensure correct processing of extent params after other params are set
This commit is contained in:
parent
67d70f8572
commit
8e971c2a60
@ -102,7 +102,9 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
|||||||
for param in alg.parameters:
|
for param in alg.parameters:
|
||||||
if param.hidden:
|
if param.hidden:
|
||||||
continue
|
continue
|
||||||
|
if isinstance(param, ParameterExtent):
|
||||||
|
col += 1
|
||||||
|
continue
|
||||||
widget = self.mainWidget.tblParameters.cellWidget(row, col)
|
widget = self.mainWidget.tblParameters.cellWidget(row, col)
|
||||||
if not self.setParamValue(param, widget, alg):
|
if not self.setParamValue(param, widget, alg):
|
||||||
self.lblProgress.setText(
|
self.lblProgress.setText(
|
||||||
@ -110,7 +112,18 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
|||||||
self.algs = None
|
self.algs = None
|
||||||
return
|
return
|
||||||
col += 1
|
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:
|
for out in alg.outputs:
|
||||||
if out.hidden:
|
if out.hidden:
|
||||||
continue
|
continue
|
||||||
@ -145,7 +158,7 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
for count, alg in enumerate(self.algs):
|
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))
|
self.setInfo(self.tr('<b>Algorithm %s starting...</b>' % alg.name))
|
||||||
if runalg(alg, self) and not self.canceled:
|
if runalg(alg, self) and not self.canceled:
|
||||||
if self.load[count]:
|
if self.load[count]:
|
||||||
@ -166,7 +179,7 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
|||||||
|
|
||||||
self.mainWidget.setEnabled(True)
|
self.mainWidget.setEnabled(True)
|
||||||
QMessageBox.information(self, self.tr('Batch processing'),
|
QMessageBox.information(self, self.tr('Batch processing'),
|
||||||
self.tr('Batch processing successfully completed!'))
|
self.tr('Batch processing completed'))
|
||||||
|
|
||||||
def loadHTMLResults(self, alg, num):
|
def loadHTMLResults(self, alg, num):
|
||||||
for out in alg.outputs:
|
for out in alg.outputs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user