Commits

Daniel Plohmann  committed f3d58ad

convenience fix: auto sorting YARA result table

  • Participants
  • Parent commits 38abf5e

Comments (0)

Files changed (1)

File idascope/widgets/YaraScannerWidget.py

             self.rules_table.resizeRowToContents(row)
 
         self.rules_table.setSelectionMode(self.QtGui.QAbstractItemView.SingleSelection)
+        # size work around according to: https://stackoverflow.com/a/3445485
+        self.rules_table.setVisible(False)
         self.rules_table.resizeColumnsToContents()
+        self.rules_table.setVisible(True)
+        # sorting
         self.rules_table.setSortingEnabled(True)
+        self.rules_table.sortByColumn(2, QtCore.Qt.SortOrder.DescendingOrder)
 
         if len(rule_results) > 0:
+            self._selected_rule = rule_results[0]
             self.populateResultTable(rule_results[0])
 
     def _calculateRuleTableData(self, rule_results):