fix link click triggering two page opens (#592)
This commit is contained in:
parent
1203775aef
commit
8a330820ed
@ -117,12 +117,9 @@ class CardLayout(QDialog):
|
||||
pform.frontPrevBox.addWidget(pform.frontWeb)
|
||||
pform.backWeb = AnkiWebView()
|
||||
pform.backPrevBox.addWidget(pform.backWeb)
|
||||
def linkClicked(url):
|
||||
openLink(url)
|
||||
for wig in pform.frontWeb, pform.backWeb:
|
||||
wig.page().setLinkDelegationPolicy(
|
||||
QWebPage.DelegateExternalLinks)
|
||||
c(wig, SIGNAL("linkClicked(QUrl)"), linkClicked)
|
||||
l.addWidget(right, 5)
|
||||
w.setLayout(l)
|
||||
self.forms.append({'tform': tform, 'pform': pform})
|
||||
|
Loading…
Reference in New Issue
Block a user