Commit e4314f88 authored by Brianna Laugher's avatar Brianna Laugher
Browse files

Move setSortingEnabled to the widget init rather than after setting the data,...

Move setSortingEnabled to the widget init rather than after setting the data, otherwise weird sorting happens
parent cba72073
......@@ -27,6 +27,7 @@ class TableWidget(QtGui.QTableWidget):
self.setVerticalScrollMode(self.ScrollPerPixel)
self.setSelectionMode(QtGui.QAbstractItemView.ContiguousSelection)
self.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
self.setSortingEnabled(True)
self.clear()
self.contextMenu = QtGui.QMenu()
self.contextMenu.addAction('Copy Selection').triggered.connect(self.copySel)
......@@ -45,7 +46,6 @@ class TableWidget(QtGui.QTableWidget):
def setData(self, data):
self.clear()
self.appendData(data)
self.setSortingEnabled(True)
self.resizeColumnsToContents()
def appendData(self, data):
......
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