Skip to content

Commit

Permalink
Strip '&' from buttons text because of automatic hotkey suffering.
Browse files Browse the repository at this point in the history
This might not be all of them idk
  • Loading branch information
Dpeta committed May 29, 2024
1 parent 213cd10 commit 67a2dd4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 67a2dd4

Please sign in to comment.