mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -472,8 +472,12 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
||||
if path != self.current_page:
|
||||
self.pending_anchor = frag
|
||||
self.load_path(path)
|
||||
elif frag:
|
||||
else:
|
||||
if frag:
|
||||
self.view.scroll_to(frag)
|
||||
else:
|
||||
# Scroll to top
|
||||
self.view.scroll_to('#')
|
||||
else:
|
||||
open_url(url)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user