mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix navigating to a bookmark not updating the displayed page number. Fixes #1360621 [(ebook-viewer) weird behaviour dealing with current page in ePub](https://bugs.launchpad.net/calibre/+bug/1360621)
This commit is contained in:
parent
e9080a686b
commit
46832dea12
@ -399,6 +399,10 @@ class EbookViewer(MainWindow):
|
|||||||
self.view.document.page_position.set_pos(bm['pos'])
|
self.view.document.page_position.set_pos(bm['pos'])
|
||||||
else:
|
else:
|
||||||
self.view.goto_bookmark(bm)
|
self.view.goto_bookmark(bm)
|
||||||
|
# Going to a bookmark does not call scrolled() so we update the
|
||||||
|
# page position explicitly. Use a timer to ensure it is
|
||||||
|
# accurate.
|
||||||
|
QTimer.singleShot(100, self.update_page_number)
|
||||||
else:
|
else:
|
||||||
self.pending_bookmark = bm
|
self.pending_bookmark = bm
|
||||||
if spine_index < 0 or spine_index >= len(self.iterator.spine):
|
if spine_index < 0 or spine_index >= len(self.iterator.spine):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user