Fix crash when using shortcut to set page type

QListWidget has no rowCount() method, it has count() instead.
This commit is contained in:
Sven Hesse 2023-12-16 17:16:25 +01:00
parent 651c5aed37
commit df24ad0008

View File

@ -124,7 +124,7 @@ class PageListEditor(QtWidgets.QWidget):
self.addAction(action_item)
def select_page_type_item(self, idx: int) -> None:
if self.cbPageType.isEnabled() and self.listWidget.rowCount() > 0:
if self.cbPageType.isEnabled() and self.listWidget.count() > 0:
self.cbPageType.setCurrentIndex(idx)
self.change_page_type(idx)