Skip to content

Commit

Permalink
[processing] do not set param value in batch interface if default is …
Browse files Browse the repository at this point in the history
…none
  • Loading branch information
volaya committed Oct 4, 2016
1 parent f7c639c commit 92e504d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions python/plugins/processing/gui/BatchPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def getWidgetFromParameter(self, param, row, col):
else:
item = QLineEdit()
try:
item.setText(unicode(param.default))
if param.default:
item.setText(unicode(param.default))
except:
pass

Expand Down Expand Up @@ -346,12 +347,12 @@ def addRow(self):
self.tblParameters.setCellWidget(row, column, item)

def removeRows(self):
#~ self.tblParameters.setUpdatesEnabled(False)
#~ indexes = self.tblParameters.selectionModel().selectedIndexes()
#~ indexes.sort()
#~ for i in reversed(indexes):
#~ self.tblParameters.model().removeRow(i.row())
#~ self.tblParameters.setUpdatesEnabled(True)
# ~ self.tblParameters.setUpdatesEnabled(False)
# ~ indexes = self.tblParameters.selectionModel().selectedIndexes()
# ~ indexes.sort()
# ~ for i in reversed(indexes):
# ~ self.tblParameters.model().removeRow(i.row())
# ~ self.tblParameters.setUpdatesEnabled(True)
if self.tblParameters.rowCount() > 2:
self.tblParameters.setRowCount(self.tblParameters.rowCount() - 1)

Expand Down

0 comments on commit 92e504d

Please sign in to comment.