revert undo shortcut change in browser

when ctrl+z pressed in focused field and no undo history left, qt
triggers the menu item instead, causing data loss

I tried capturing the shortcut in JS and manually executing the undo,
and that seems to work on macOS, but not on Windows.

fixes
https://anki.tenderapp.com/discussions/ankidesktop/33064-how-to-undo-reverted-to-state-deleting-my-cards
This commit is contained in:
Damien Elmes 2019-03-11 13:43:25 +10:00
parent 8de0e7e54c
commit 44952ff727
2 changed files with 1 additions and 3 deletions

View file

@ -421,8 +421,6 @@ class Browser(QMainWindow):
f.filter.clicked.connect(self.onFilterButton)
# edit
f.actionUndo.triggered.connect(self.mw.onUndo)
if qtminor < 11:
f.actionUndo.setShortcut(QKeySequence(_("Ctrl+Alt+Z")))
f.actionInvertSelection.triggered.connect(self.invertSelection)
f.actionSelectNotes.triggered.connect(self.selectNotes)
if not isMac:

View file

@ -339,7 +339,7 @@
<string>&amp;Undo</string>
</property>
<property name="shortcut">
<string>Ctrl+Z</string>
<string>Ctrl+Alt+Z</string>
</property>
</action>
<action name="actionInvertSelection">