mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
E-book viewer: Allow reloading the current book by pressing F5 or Ctrl+R. Fixes #1354059 [[feature-request] reload ePub file in ebook-viewer](https://bugs.launchpad.net/calibre/+bug/1354059)
This commit is contained in:
parent
af628992c0
commit
84d7a77d2d
@ -87,4 +87,6 @@ SHORTCUTS = {
|
||||
'Bookmark': (['Ctrl+B'],
|
||||
_('Bookmark the current location')),
|
||||
|
||||
'Reload': (['Ctrl+R', 'F5'],
|
||||
_('Reload the current book')),
|
||||
}
|
||||
|
@ -905,6 +905,10 @@ class EbookViewer(MainWindow):
|
||||
return
|
||||
if key == 'Focus Search':
|
||||
self.search.setFocus(Qt.OtherFocusReason)
|
||||
return
|
||||
if key == 'Reload' and getattr(self.iterator, 'pathtoebook', None):
|
||||
self.load_ebook(self.iterator.pathtoebook)
|
||||
return
|
||||
if not self.view.handle_key_press(event):
|
||||
event.ignore()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user