mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Clear history when loading a new book
This commit is contained in:
parent
f1db7eab2f
commit
6e2122df17
@ -504,6 +504,7 @@ class WebView(RestartingWebEngineView):
|
|||||||
|
|
||||||
def start_book_load(self, initial_cfi=None, initial_toc_node=None, initial_bookpos=None):
|
def start_book_load(self, initial_cfi=None, initial_toc_node=None, initial_bookpos=None):
|
||||||
key = (set_book_path.path,)
|
key = (set_book_path.path,)
|
||||||
|
self.clear_history()
|
||||||
self.execute_when_ready('start_book_load', key, initial_cfi, initial_toc_node, initial_bookpos, set_book_path.pathtoebook)
|
self.execute_when_ready('start_book_load', key, initial_cfi, initial_toc_node, initial_bookpos, set_book_path.pathtoebook)
|
||||||
|
|
||||||
def execute_when_ready(self, action, *args):
|
def execute_when_ready(self, action, *args):
|
||||||
@ -568,3 +569,6 @@ class WebView(RestartingWebEngineView):
|
|||||||
|
|
||||||
def goto_frac(self, frac):
|
def goto_frac(self, frac):
|
||||||
self.execute_when_ready('goto_frac', frac)
|
self.execute_when_ready('goto_frac', frac)
|
||||||
|
|
||||||
|
def clear_history(self):
|
||||||
|
self._page.history().clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user