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': [],
|
||||
'tag': [],
|
||||
}
|
||||
for elem in search.split(" "):
|
||||
if len(elem) > 2 and elem.startswith("t:"):
|
||||
d['tag'].append(elem[2:])
|
||||
else:
|
||||
d['str'].append(elem)
|
||||
if search:
|
||||
for elem in search.split():
|
||||
if len(elem) > 2 and elem.startswith("t:"):
|
||||
d['tag'].append(elem[2:])
|
||||
else:
|
||||
d['str'].append(elem)
|
||||
return d
|
||||
|
||||
def showMatching(self):
|
||||
|
|
Loading…
Reference in a new issue