fix slowdown due to new splitting

This commit is contained in:
Damien Elmes 2009-03-23 12:06:33 +09:00
parent f467a350b5
commit 3985d72670

View file

@ -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):