Skip to content

Commit 8e971c2

Browse files
committed
[processing] Batch: ensure correct processing of extent params after other params are set
1 parent 67d70f8 commit 8e971c2

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

python/plugins/processing/gui/BatchAlgorithmDialog.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,28 @@ def accept(self):
102102
for param in alg.parameters:
103103
if param.hidden:
104104
continue
105-
105+
if isinstance(param, ParameterExtent):
106+
col += 1
107+
continue
106108
widget = self.mainWidget.tblParameters.cellWidget(row, col)
107109
if not self.setParamValue(param, widget, alg):
108110
self.lblProgress.setText(
109111
self.tr('<b>Missing parameter value: %s (row %d)</b>') % (param.description, row + 1))
110112
self.algs = None
111113
return
112114
col += 1
113-
115+
col = 0
116+
for param in alg.parameters:
117+
if param.hidden:
118+
continue
119+
if isinstance(param, ParameterExtent):
120+
widget = self.mainWidget.tblParameters.cellWidget(row, col)
121+
if not self.setParamValue(param, widget, alg):
122+
self.lblProgress.setText(
123+
self.tr('<b>Missing parameter value: %s (row %d)</b>') % (param.description, row + 1))
124+
self.algs = None
125+
return
126+
col += 1
114127
for out in alg.outputs:
115128
if out.hidden:
116129
continue
@@ -145,7 +158,7 @@ def accept(self):
145158
pass
146159

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

167180
self.mainWidget.setEnabled(True)
168181
QMessageBox.information(self, self.tr('Batch processing'),
169-
self.tr('Batch processing successfully completed!'))
182+
self.tr('Batch processing completed'))
170183

171184
def loadHTMLResults(self, alg, num):
172185
for out in alg.outputs:

0 commit comments

Comments
 (0)