Skip to content

Commit bd9945f

Browse files
committed
[processing] Change min rows in batch processing to 1
While no-one is likely to use the batch dialog to run a single operation, it's a bit unexpected to see two empty rows, which can't be removed, when first opening this dialog
1 parent abe5756 commit bd9945f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/plugins/processing/gui/BatchPanel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ def initWidgets(self):
129129
self.tblParameters.setHorizontalHeaderItem(
130130
column, QTableWidgetItem(self.tr('Load in QGIS')))
131131

132-
# Add two empty rows by default
133-
for i in range(2):
134-
self.addRow()
132+
# Add an empty row to begin
133+
self.addRow()
135134

136135
self.tblParameters.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
137136
self.tblParameters.horizontalHeader().setDefaultSectionSize(250)
@@ -265,7 +264,7 @@ def addRow(self):
265264
wrapper.postInitialize(list(wrappers.values()))
266265

267266
def removeRows(self):
268-
if self.tblParameters.rowCount() > 2:
267+
if self.tblParameters.rowCount() > 1:
269268
self.wrappers.pop()
270269
self.tblParameters.setRowCount(self.tblParameters.rowCount() - 1)
271270

0 commit comments

Comments
 (0)