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:
Kovid Goyal 2014-08-07 22:09:54 +05:30
parent af628992c0
commit 84d7a77d2d
2 changed files with 6 additions and 0 deletions

View File

@ -87,4 +87,6 @@ SHORTCUTS = {
'Bookmark': (['Ctrl+B'],
_('Bookmark the current location')),
'Reload': (['Ctrl+R', 'F5'],
_('Reload the current book')),
}

View File

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