fix link click triggering two page opens (#592)

This commit is contained in:
Damien Elmes 2013-01-29 09:17:48 +09:00
parent 1203775aef
commit 8a330820ed

View File

@ -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})