From 612eafc64a85b55cf870340db1a4c6aaba6de251 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 25 Apr 2009 01:18:44 +0900 Subject: [PATCH] prevent double click except in chinese/japanese models --- ankiqt/ui/facteditor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 32fef4bb4..223b97bfe 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -995,6 +995,11 @@ class FactEdit(QTextEdit): # this shouldn't be necessary if/when we move away from kakasi def mouseDoubleClickEvent(self, evt): + t = self.parent.fact.model.tags.lower() + if (not "japanese" in t and + not "mandarin" in t and + not "cantonese" in t): + return r = QRegExp("\\{(.*[|,].*)\\}") r.setMinimal(True)