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:
|
if path != self.current_page:
|
||||||
self.pending_anchor = frag
|
self.pending_anchor = frag
|
||||||
self.load_path(path)
|
self.load_path(path)
|
||||||
elif frag:
|
else:
|
||||||
self.view.scroll_to(frag)
|
if frag:
|
||||||
|
self.view.scroll_to(frag)
|
||||||
|
else:
|
||||||
|
# Scroll to top
|
||||||
|
self.view.scroll_to('#')
|
||||||
else:
|
else:
|
||||||
open_url(url)
|
open_url(url)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user