Disable keyrepeat for shortcuts

Currently the keyboard shortcut actions gets repeated when holding down the shortcut keys. I don't think this is intentional as I didn't find any shortcuts that would benefit from this behavior. 

Besides just being a bit annoying, this could also lead to crashes as the program would get into an undefined state.

For example if you held down the crop shortcut key (shift + c) and clicked outside of the crop hot zones, beeref would crash most of the time.
This commit is contained in:
DarkDefender 2024-05-30 16:38:06 +02:00 committed by Rebecca Breu
parent 6e3bc35f74
commit c545ad6ddc

View file

@ -70,6 +70,7 @@ class ActionsMixin:
def _create_actions(self):
for action in actions.values():
qaction = QtGui.QAction(action.text, self)
qaction.setAutoRepeat(False)
shortcuts = action.get_shortcuts()
if shortcuts:
qaction.setShortcuts(shortcuts)