mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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': (['Ctrl+B'],
|
||||||
_('Bookmark the current location')),
|
_('Bookmark the current location')),
|
||||||
|
|
||||||
|
'Reload': (['Ctrl+R', 'F5'],
|
||||||
|
_('Reload the current book')),
|
||||||
}
|
}
|
||||||
|
@ -905,6 +905,10 @@ class EbookViewer(MainWindow):
|
|||||||
return
|
return
|
||||||
if key == 'Focus Search':
|
if key == 'Focus Search':
|
||||||
self.search.setFocus(Qt.OtherFocusReason)
|
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):
|
if not self.view.handle_key_press(event):
|
||||||
event.ignore()
|
event.ignore()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user