Commit f54dac6c authored by Luke Campagnola's avatar Luke Campagnola
Browse files

cleanup

parent df8562ce
...@@ -28,8 +28,6 @@ def _defersort(fn): ...@@ -28,8 +28,6 @@ def _defersort(fn):
self.setSortingEnabled(self._sorting) self.setSortingEnabled(self._sorting)
self._sorting = None self._sorting = None
defersort.func_name = fn.func_name + '_defersort'
return defersort return defersort
...@@ -63,15 +61,13 @@ class TableWidget(QtGui.QTableWidget): ...@@ -63,15 +61,13 @@ class TableWidget(QtGui.QTableWidget):
self.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) self.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
self.clear() self.clear()
if 'sortable' not in kwds: kwds.setdefault('sortable', True)
kwds['sortable'] = True kwds.setdefault('editable', False)
for kwd, val in kwds.items(): self.setEditable(kwds.pop('editable'))
if kwd == 'editable': self.setSortingEnabled(kwds.pop('sortable'))
self.setEditable(val)
elif kwd == 'sortable': if len(kwds) > 0:
self.setSortingEnabled(val) raise TypeError("Invalid keyword arguments '%s'" % kwds.keys())
else:
raise TypeError("Invalid keyword argument '%s'" % kwd)
self._sorting = None self._sorting = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment