mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-26 21:04:07 +01: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
2 changed files with 6 additions and 0 deletions
|
|
@ -87,4 +87,6 @@
|
|||
'Bookmark': (['Ctrl+B'],
|
||||
_('Bookmark the current location')),
|
||||
|
||||
'Reload': (['Ctrl+R', 'F5'],
|
||||
_('Reload the current book')),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -905,6 +905,10 @@ def keyPressEvent(self, event):
|
|||
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…
Reference in a new issue