mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix keyboard shortcuts to shrink/grow selection not working. Fixes #1900942 [E-book viewer: the "Alter the current selection" feature doesn't seem to work](https://bugs.launchpad.net/calibre/+bug/1900942)
This commit is contained in:
parent
a6737d926d
commit
ae222c64f3
@ -564,6 +564,7 @@ class SelectionBar:
|
|||||||
sc_name = shortcut_for_key_event(ev, self.view.keyboard_shortcut_map)
|
sc_name = shortcut_for_key_event(ev, self.view.keyboard_shortcut_map)
|
||||||
if not sc_name:
|
if not sc_name:
|
||||||
return
|
return
|
||||||
|
forwarded = {'toggle_highlights': True, 'extend_selection_by_word': True, 'shrink_selection_by_word': True}
|
||||||
if sc_name is 'show_chrome':
|
if sc_name is 'show_chrome':
|
||||||
self.clear_selection()
|
self.clear_selection()
|
||||||
elif sc_name is 'copy_to_clipboard':
|
elif sc_name is 'copy_to_clipboard':
|
||||||
@ -574,7 +575,7 @@ class SelectionBar:
|
|||||||
self.book_search()
|
self.book_search()
|
||||||
elif sc_name is 'new_bookmark':
|
elif sc_name is 'new_bookmark':
|
||||||
self.new_bookmark()
|
self.new_bookmark()
|
||||||
elif sc_name is 'toggle_highlights':
|
elif forwarded[sc_name]:
|
||||||
self.view.on_handle_shortcut({'name': sc_name})
|
self.view.on_handle_shortcut({'name': sc_name})
|
||||||
|
|
||||||
def report_failed_edit_highlight(self, annot_id):
|
def report_failed_edit_highlight(self, annot_id):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user