From b0a721f763e031ecdf0df9c7c5d8a780b4a79fa4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 12 Apr 2017 13:55:57 +0530 Subject: [PATCH] Also allow Alt+Up/down in the toc edit tool --- src/calibre/gui2/toc/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/toc/main.py b/src/calibre/gui2/toc/main.py index f5c225b03b..2266d027f7 100644 --- a/src/calibre/gui2/toc/main.py +++ b/src/calibre/gui2/toc/main.py @@ -533,10 +533,10 @@ class TreeWidget(QTreeWidget): # {{{ elif ev.key() == Qt.Key_Right and ev.modifiers() & Qt.CTRL: self.move_right() ev.accept() - elif ev.key() == Qt.Key_Up and ev.modifiers() & Qt.CTRL: + elif ev.key() == Qt.Key_Up and (ev.modifiers() & Qt.CTRL or ev.modifiers() & Qt.ALT): self.move_up() ev.accept() - elif ev.key() == Qt.Key_Down and ev.modifiers() & Qt.CTRL: + elif ev.key() == Qt.Key_Down and (ev.modifiers() & Qt.CTRL or ev.modifiers() & Qt.ALT): self.move_down() ev.accept() elif ev.key() in (Qt.Key_Delete, Qt.Key_Backspace): @@ -991,6 +991,7 @@ class TOCEditor(QDialog): # {{{ # }}} + if __name__ == '__main__': app = Application([], force_calibre_style=True) app