From d181634728c5f9ef282333c197df43a1987db603 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Oct 2014 07:33:10 +0530 Subject: [PATCH] Edit Book: Fix changing the editor undo/redo keyboard shortcuts not preventing the old shortcuts from working. --- src/calibre/gui2/tweak_book/editor/text.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index cad3578590..0bf4a3227f 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -561,10 +561,11 @@ class TextEdit(PlainTextEdit): return True if ev.type() == ev.ShortcutOverride: if ev in ( - # Let the global cut/copy/paste shortcuts work,this avoids the nbsp + # Let the global cut/copy/paste/undo/redo shortcuts work,this avoids the nbsp # problem as well, since they use the overridden copy() method - # instead of the one from Qt - QKeySequence.Copy, QKeySequence.Cut, QKeySequence.Paste, + # instead of the one from Qt, and allows proper customization + # of the shortcuts + QKeySequence.Copy, QKeySequence.Cut, QKeySequence.Paste, QKeySequence.Undo, QKeySequence.Redo ) or ( # This is used to convert typed hex codes into unicode # characters