E-book-viewer: Fix TOC links without anchors not scrolling to the top of the current flow

This commit is contained in:
Kovid Goyal 2013-01-16 16:12:43 +05:30
parent 992ceaa856
commit 7208c73480

View File

@ -758,7 +758,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
self.view.scroll_to(frag) self.view.scroll_to(frag)
else: else:
# Scroll to top # Scroll to top
self.view.scroll_to('#') self.view.scroll_to(0)
if self.view.document.ypos == oldpos: if self.view.document.ypos == oldpos:
# If we are coming from goto_next_section() call this will # If we are coming from goto_next_section() call this will
# cause another goto next section call with the next toc # cause another goto next section call with the next toc