mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Clear history when opening new book
This commit is contained in:
parent
0d42146e79
commit
ea21d6ae68
@ -790,6 +790,7 @@ class EbookViewer(MainWindow):
|
||||
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 @@ class History(list): # {{{
|
||||
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…
x
Reference in New Issue
Block a user