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:
Kovid Goyal 2014-08-23 22:20:10 +05:30
parent e9080a686b
commit 46832dea12

View File

@ -399,6 +399,10 @@ class EbookViewer(MainWindow):
self.view.document.page_position.set_pos(bm['pos'])
else:
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:
self.pending_bookmark = bm
if spine_index < 0 or spine_index >= len(self.iterator.spine):