From 0b7c8bceccbed94991f8b9d2ee3c082da8c168e1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 25 Apr 2009 19:18:07 +0900 Subject: [PATCH] fix double-click to select --- ankiqt/ui/facteditor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 223b97bfe..b1dcc32a8 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -999,7 +999,7 @@ class FactEdit(QTextEdit): if (not "japanese" in t and not "mandarin" in t and not "cantonese" in t): - return + return QTextEdit.mouseDoubleClickEvent(self,evt) r = QRegExp("\\{(.*[|,].*)\\}") r.setMinimal(True) @@ -1030,8 +1030,7 @@ class FactEdit(QTextEdit): result = r.indexIn(self.toPlainText(), blockoffset) if found == "": - QTextEdit.mouseDoubleClickEvent(self,evt) - return + return QTextEdit.mouseDoubleClickEvent(self,evt) self.setPlainText(self.toPlainText().replace(result, r.matchedLength(), found)) def focusInEvent(self, evt):