Skip to content

Commit

Permalink
[processing] Change min rows in batch processing to 1
Browse files Browse the repository at this point in the history
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 bd9945f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/plugins/processing/gui/BatchPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit bd9945f

Please sign in to comment.