mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:54:28 +02:00
E-book viewer: Fix clicking entries in TOC that point to the currently loaded document not scrolling view to the top of the document
This commit is contained in:
parent
e13ef02c61
commit
06004fca56
1 changed files with 6 additions and 2 deletions
|
|
@ -472,8 +472,12 @@ def link_clicked(self, url):
|
|||
if path != self.current_page:
|
||||
self.pending_anchor = frag
|
||||
self.load_path(path)
|
||||
elif frag:
|
||||
self.view.scroll_to(frag)
|
||||
else:
|
||||
if frag:
|
||||
self.view.scroll_to(frag)
|
||||
else:
|
||||
# Scroll to top
|
||||
self.view.scroll_to('#')
|
||||
else:
|
||||
open_url(url)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue