From 67a2dd4aced044dfa1df74a15107c2b99fd60d78 Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Wed, 29 May 2024 02:56:35 +0200 Subject: [PATCH] Strip '&' from buttons text because of automatic hotkey suffering. This might not be all of them idk --- menus.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/menus.py b/menus.py index f4f16030..14818353 100644 --- a/menus.py +++ b/menus.py @@ -109,8 +109,7 @@ def addItem(self, item, new=True): def currentQuirk(self): if isinstance(self.currentItem(), PesterQuirkItem): return self.currentItem() - else: - return None + return None @QtCore.pyqtSlot() def upShiftQuirk(self): @@ -661,7 +660,8 @@ def changePage(self, page): @QtCore.pyqtSlot() def nextPage(self): - if self.next.text() == "Finish": + text = self.next.text().replace("&", "") # Qt adds "&" for hotkeys + if text == "Finish": self.accept() return cur = self.pages.currentIndex() @@ -1758,7 +1758,8 @@ def reset_themeBox(): @QtCore.pyqtSlot(QtWidgets.QAbstractButton) def changePage(self, button): - self.pages.setCurrentIndex(self.tabNames.index(button.text())) + text = button.text().replace("&", "") # Qt adds "&" for hotkeys sometimes + self.pages.setCurrentIndex(self.tabNames.index(text)) @QtCore.pyqtSlot(int) def notifyChange(self, state):