don't check if already a leech, since we don't trigger every time

This commit is contained in:
Damien Elmes 2009-06-25 06:47:53 +09:00
parent ef4d9a42f8
commit 3839c635a0

View file

@ -461,7 +461,6 @@ Please do not file a bug report with Anki.<br>""")
def handleLeech(self): def handleLeech(self):
self.deck.refresh() self.deck.refresh()
tags = self.currentCard.fact.tags tags = self.currentCard.fact.tags
wasLeech = "Leech" in tags
tags = addTags("Leech", tags) tags = addTags("Leech", tags)
self.currentCard.fact.tags = canonifyTags(tags) self.currentCard.fact.tags = canonifyTags(tags)
self.currentCard.fact.setModified(textChanged=True) self.currentCard.fact.setModified(textChanged=True)
@ -470,7 +469,7 @@ Please do not file a bug report with Anki.<br>""")
<b>%s</b>... is a <a href="http://ichi2.net/anki/wiki/Leeches">leech</a>.""") <b>%s</b>... is a <a href="http://ichi2.net/anki/wiki/Leeches">leech</a>.""")
% stripHTML(stripSounds(self.currentCard.question)).\ % stripHTML(stripSounds(self.currentCard.question)).\
replace("\n", " ")[0:30]) replace("\n", " ")[0:30])
if self.deck.getBool('suspendLeeches') and not wasLeech: if self.deck.getBool('suspendLeeches'):
self.deck.suspendCards([self.currentCard.id]) self.deck.suspendCards([self.currentCard.id])
txt += _(" It has been suspended.") txt += _(" It has been suspended.")
self.deck.refresh() self.deck.refresh()