Edit Book: Fix changing the editor undo/redo keyboard shortcuts not preventing the old shortcuts from working.

This commit is contained in:
Kovid Goyal 2014-10-14 07:33:10 +05:30
parent 17e70759ee
commit d181634728

View File

@ -561,10 +561,11 @@ class TextEdit(PlainTextEdit):
return True return True
if ev.type() == ev.ShortcutOverride: if ev.type() == ev.ShortcutOverride:
if ev in ( 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 # problem as well, since they use the overridden copy() method
# instead of the one from Qt # instead of the one from Qt, and allows proper customization
QKeySequence.Copy, QKeySequence.Cut, QKeySequence.Paste, # of the shortcuts
QKeySequence.Copy, QKeySequence.Cut, QKeySequence.Paste, QKeySequence.Undo, QKeySequence.Redo
) or ( ) or (
# This is used to convert typed hex codes into unicode # This is used to convert typed hex codes into unicode
# characters # characters