E-book viewer: Fix a regression that caused clicking links in the footnote popup window to stop working

This commit is contained in:
Kovid Goyal 2017-01-12 16:01:03 +05:30
parent c36d652534
commit 89ab75ce4b
2 changed files with 5 additions and 1 deletions

View File

@ -877,6 +877,10 @@ class DocumentView(QWebView): # {{{
if self.manager is not None:
self.manager.link_clicked(url)
def footnote_link_clicked(self, qurl):
path = qurl.toLocalFile()
self.link_clicked(self.as_url(path))
def sizeHint(self):
return self._size_hint

View File

@ -101,7 +101,7 @@ class Footnotes(object):
def set_footnotes_view(self, fv):
self.footnotes_view = fv
self.clone_settings()
fv.page().linkClicked.connect(self.view.link_clicked)
fv.page().linkClicked.connect(self.view.footnote_link_clicked)
fv.page().js_loader = self.view.document.js_loader
def clone_settings(self):