mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix back button not working after jumping to a bookmark. Fixes #1931599 [[Enhancement] E-book viewer: clicking on bookmarks should create jump positions](https://bugs.launchpad.net/calibre/+bug/1931599)
This commit is contained in:
parent
f77a5f5c1a
commit
83ede77029
@ -366,11 +366,11 @@ class EbookViewer(MainWindow):
|
|||||||
# annotations will be saved in book file on exit
|
# annotations will be saved in book file on exit
|
||||||
self.save_annotations(in_book_file=False)
|
self.save_annotations(in_book_file=False)
|
||||||
|
|
||||||
def goto_cfi(self, cfi):
|
def goto_cfi(self, cfi, add_to_history=False):
|
||||||
self.web_view.goto_cfi(cfi)
|
self.web_view.goto_cfi(cfi, add_to_history=add_to_history)
|
||||||
|
|
||||||
def bookmark_activated(self, cfi):
|
def bookmark_activated(self, cfi):
|
||||||
self.goto_cfi(cfi)
|
self.goto_cfi(cfi, add_to_history=True)
|
||||||
|
|
||||||
def view_image(self, name):
|
def view_image(self, name):
|
||||||
path = get_path_for_name(name)
|
path = get_path_for_name(name)
|
||||||
|
@ -649,8 +649,8 @@ class WebView(RestartingWebEngineView):
|
|||||||
def goto_toc_node(self, node_id):
|
def goto_toc_node(self, node_id):
|
||||||
self.execute_when_ready('goto_toc_node', node_id)
|
self.execute_when_ready('goto_toc_node', node_id)
|
||||||
|
|
||||||
def goto_cfi(self, cfi):
|
def goto_cfi(self, cfi, add_to_history=False):
|
||||||
self.execute_when_ready('goto_cfi', cfi)
|
self.execute_when_ready('goto_cfi', cfi, bool(add_to_history))
|
||||||
|
|
||||||
def notify_full_screen_state_change(self, in_fullscreen_mode):
|
def notify_full_screen_state_change(self, in_fullscreen_mode):
|
||||||
self.execute_when_ready('full_screen_state_changed', in_fullscreen_mode)
|
self.execute_when_ready('full_screen_state_changed', in_fullscreen_mode)
|
||||||
|
@ -12,7 +12,7 @@ from widgets import create_button
|
|||||||
|
|
||||||
|
|
||||||
def goto_cfi(cfi, view):
|
def goto_cfi(cfi, view):
|
||||||
view.goto_cfi(cfi)
|
view.goto_cfi(cfi, True)
|
||||||
|
|
||||||
|
|
||||||
def remove_bookmark(annotations_manager, title, list_dom_node):
|
def remove_bookmark(annotations_manager, title, list_dom_node):
|
||||||
|
@ -234,8 +234,8 @@ def goto_toc_node(node_id):
|
|||||||
|
|
||||||
|
|
||||||
@from_python
|
@from_python
|
||||||
def goto_cfi(cfi):
|
def goto_cfi(cfi, add_to_history):
|
||||||
view.goto_cfi(cfi)
|
view.goto_cfi(cfi, v'!!add_to_history')
|
||||||
|
|
||||||
|
|
||||||
@from_python
|
@from_python
|
||||||
|
Loading…
x
Reference in New Issue
Block a user