Skip to content

Commit

Permalink
[processing] correctly handle editable and non-editable fixed tables (f…
Browse files Browse the repository at this point in the history
…ix #11602)
  • Loading branch information
alexbruy committed Nov 19, 2014
1 parent 4c24666 commit 5e6f4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/FixedTableDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, param, table):
self.btnRemove.clicked.connect(lambda: self.removeRows())
self.btnRemoveAll.clicked.connect(lambda: self.removeRows(True))

if self.param.fixedNumOfRows:
if not self.param.fixedNumOfRows:
self.btnAdd.setEnabled(False)
self.btnRemove.setEnabled(False)
self.btnRemoveAll.setEnabled(False)
Expand Down Expand Up @@ -106,5 +106,5 @@ def removeRows(self, removeAll=False):
self.tblView.setUpdatesEnabled(True)

def addRow(self):
items = [QStandardItem('') for i in xrange(self.tblView.model().columnCount())]
items = [QStandardItem('0') for i in xrange(self.tblView.model().columnCount())]
self.tblView.model().appendRow(items)

0 comments on commit 5e6f4c2

Please sign in to comment.