Also allow Alt+Up/down in the toc edit tool

This commit is contained in:
Kovid Goyal 2017-04-12 13:55:57 +05:30
parent f95cc11015
commit b0a721f763

View File

@ -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