Skip to content
Permalink
Browse files

[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
  • Loading branch information
nyalldawson committed Nov 10, 2017
1 parent abe5756 commit bd9945ffe3a6f4bc833746292098790ba1b375fa
Showing with 3 additions and 4 deletions.
  1. +3 −4 python/plugins/processing/gui/BatchPanel.py
@@ -129,9 +129,8 @@ def initWidgets(self):
self.tblParameters.setHorizontalHeaderItem(
column, QTableWidgetItem(self.tr('Load in QGIS')))

# Add two empty rows by default
for i in range(2):
self.addRow()
# Add an empty row to begin
self.addRow()

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

def removeRows(self):
if self.tblParameters.rowCount() > 2:
if self.tblParameters.rowCount() > 1:
self.wrappers.pop()
self.tblParameters.setRowCount(self.tblParameters.rowCount() - 1)

0 comments on commit bd9945f

Please sign in to comment.
You can’t perform that action at this time.