mirror of
https://github.com/ankitects/anki.git
synced 2025-12-15 07:40:58 -05:00
fix double-click to select
This commit is contained in:
parent
0946a3e0c4
commit
0b7c8bcecc
1 changed files with 2 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue