mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 16:03:17 +02:00
Clear history when opening new book
This commit is contained in:
parent
0d42146e79
commit
ea21d6ae68
2 changed files with 4 additions and 0 deletions
|
|
@ -790,6 +790,7 @@ def load_ebook(self, pathtoebook, open_at=None, reopen_at=None):
|
|||
self.save_current_position()
|
||||
self.iterator.__exit__()
|
||||
self.iterator = EbookIterator(pathtoebook)
|
||||
self.history.clear()
|
||||
self.open_progress_indicator(_('Loading ebook...'))
|
||||
worker = Worker(target=partial(self.iterator.__enter__, view_kepub=True))
|
||||
worker.start()
|
||||
|
|
|
|||
|
|
@ -111,6 +111,9 @@ def __init__(self, action_back=None, action_forward=None):
|
|||
self.forward_pos = None
|
||||
self.set_actions()
|
||||
|
||||
def clear(self):
|
||||
del self[:]
|
||||
|
||||
def set_actions(self):
|
||||
if self.action_back is not None:
|
||||
self.action_back.setDisabled(self.back_pos is None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue