Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[TABLE] Rename __add_criterion() to add_criterion()

  • Loading branch information...
commit 932366b0fac03b8ea5cfcfb94b1b92ac468aa2c3 1 parent f52ab14
@oso authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 ui/table.py
View
17 ui/table.py
@@ -25,11 +25,9 @@ def __init__(self, criteria=None, parent=None):
self.setColumnWidth(1, 60)
self.setColumnWidth(2, 100)
- if criteria == None:
- return
-
- for criterion in criteria:
- self.add(criterion)
+ if criteria != None:
+ for criterion in criteria:
+ self.add(criterion)
def __add_headers(self):
item = QtGui.QTableWidgetItem()
@@ -152,15 +150,16 @@ def criteria_enabled(self):
class profiles_table(QtGui.QTableWidget):
- def __init__(self, criteria, parent=None):
+ def __init__(self, criteria=None, parent=None):
super(QtGui.QTableWidget, self).__init__(parent)
self.parent = parent
self.col_crit = {}
- for criterion in criteria:
- self.__add_criterion(criterion)
+ if criteria != None:
+ for criterion in criteria:
+ self.add_criterion(criterion)
- def __add_criterion(self, criterion):
+ def add_criterion(self, criterion):
col = self.columnCount()
self.insertColumn(col)
item = QtGui.QTableWidgetItem()
Please sign in to comment.
Something went wrong with that request. Please try again.