Commits

Flashpoint committed 8e343fc

Sorting according to p-values works.

Comments (0)

Files changed (1)

_bioinformatics/widgets/OWSetEnrichment.py

         if not self.treeWidget():
             return id(self) < id(other)
         column = self.treeWidget().sortColumn()
-        lhs = _toPyObject(self.data(column, Qt.DisplayRole))
-        rhs = _toPyObject(other.data(column, Qt.DisplayRole))
+        if column == 4:
+            lhs = _toPyObject(self.data(column, 42))
+            rhs = _toPyObject(other.data(column, 42))
+        else:
+            lhs = _toPyObject(self.data(column, Qt.DisplayRole))
+            rhs = _toPyObject(other.data(column, Qt.DisplayRole))
         return lhs < rhs
 
 def name_or_none(id):