select type/generation and sorting enabled did not go well together

This commit is contained in:
Dominik Demuth 2024-09-29 16:03:13 +02:00
parent 9039c44ce7
commit fa84b0382e

View File

@ -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()