Skip to content
Permalink
Browse files

[processing] Remove selected rows from batch table, not always last row

  • Loading branch information
nyalldawson committed Apr 27, 2019
1 parent ec4cfed commit c12fd877edfac7db3ef697cd6f9ff300ee732e16
Showing with 12 additions and 6 deletions.
  1. +12 −3 python/plugins/processing/gui/BatchPanel.py
  2. +0 −3 python/plugins/processing/ui/widgetBatchPanel.ui
@@ -544,9 +544,18 @@ def addRow(self):
wrapper.postInitialize(list(wrappers.values()))

def removeRows(self):
if self.tblParameters.rowCount() > 2:
self.wrappers.pop()
self.tblParameters.setRowCount(self.tblParameters.rowCount() - 1)
rows = set()
for index in self.tblParameters.selectedIndexes():
if index.row() == 0:
continue
rows.add(index.row())

for row in sorted(rows, reverse=True):
if self.tblParameters.rowCount() <= 2:
break

del self.wrappers[row - 1]
self.tblParameters.removeRow(row)

def toggleAdvancedMode(self, checked):
for column, param in enumerate(self.alg.parameterDefinitions()):
@@ -89,9 +89,6 @@
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="0" column="3">

0 comments on commit c12fd87

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