From fa84b0382eb6264eb41b29d739c21eaae582d2c5 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sun, 29 Sep 2024 16:03:13 +0200 Subject: [PATCH] select type/generation and sorting enabled did not go well together --- src/gui_qt/lib/pokemon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui_qt/lib/pokemon.py b/src/gui_qt/lib/pokemon.py index 15df4b7..b9b7ff8 100644 --- a/src/gui_qt/lib/pokemon.py +++ b/src/gui_qt/lib/pokemon.py @@ -149,6 +149,8 @@ class QPoke(QtWidgets.QDialog, Ui_Dialog): self.tableWidget_2.clearContents() self.tableWidget_2.setRowCount(0) + self.tableWidget_2.setSortingEnabled(False) + for entry in result: row = self.tableWidget_2.rowCount() self.tableWidget_2.setRowCount(row+1) @@ -215,6 +217,7 @@ class QPoke(QtWidgets.QDialog, Ui_Dialog): self.tableWidget_2.setItem(row, 12, item) self.tableWidget_2.resizeColumnToContents(1) + self.tableWidget_2.setSortingEnabled(True) def show_pokemon(self): table = self.sender()