mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix slowdown due to new splitting
This commit is contained in:
parent
f467a350b5
commit
3985d72670
1 changed files with 6 additions and 5 deletions
|
@ -106,11 +106,12 @@ class DeckModel(QAbstractTableModel):
|
||||||
d = {'str': [],
|
d = {'str': [],
|
||||||
'tag': [],
|
'tag': [],
|
||||||
}
|
}
|
||||||
for elem in search.split(" "):
|
if search:
|
||||||
if len(elem) > 2 and elem.startswith("t:"):
|
for elem in search.split():
|
||||||
d['tag'].append(elem[2:])
|
if len(elem) > 2 and elem.startswith("t:"):
|
||||||
else:
|
d['tag'].append(elem[2:])
|
||||||
d['str'].append(elem)
|
else:
|
||||||
|
d['str'].append(elem)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def showMatching(self):
|
def showMatching(self):
|
||||||
|
|
Loading…
Reference in a new issue