mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-02 08:35:36 +01:00
When clicking links in the preview panel that dont have fragments, go to top of linked file instead of remaining at last position
This commit is contained in:
parent
b66c02b2ca
commit
47bacaa0eb
1 changed files with 2 additions and 2 deletions
|
|
@ -29,7 +29,7 @@
|
|||
from calibre.ebooks.oeb.base import serialize, OEB_DOCS
|
||||
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2.tweak_book import current_container, editors, tprefs, actions
|
||||
from calibre.gui2.tweak_book import current_container, editors, tprefs, actions, TOP
|
||||
from calibre.gui2.viewer.documentview import apply_settings
|
||||
from calibre.gui2.viewer.config import config
|
||||
from calibre.gui2.widgets2 import HistoryLineEdit2
|
||||
|
|
@ -499,7 +499,7 @@ def request_sync(self, tagname, href, lnum):
|
|||
if name == self.current_name:
|
||||
return self.view.page().go_to_anchor(urlparse(href).fragment, lnum)
|
||||
if name and c.exists(name) and c.mime_map[name] in OEB_DOCS:
|
||||
return self.link_clicked.emit(name, urlparse(href).fragment)
|
||||
return self.link_clicked.emit(name, urlparse(href).fragment or TOP)
|
||||
self.sync_requested.emit(self.current_name, lnum)
|
||||
|
||||
def request_split(self, loc):
|
||||
|
|
|
|||
Loading…
Reference in a new issue