limit plugin warning to once a session

This commit is contained in:
Damien Elmes 2010-12-11 22:04:24 +09:00
parent 98597dd56d
commit 49b744f77d

View file

@ -135,9 +135,11 @@ class Fact(object):
if textChanged:
if not deck:
# FIXME: compat code
import sys; sys.stderr.write(
"plugin needs to pass deck to fact.setModified()")
import ankiqt
if not getattr(ankiqt, 'setModWarningShown', None):
import sys; sys.stderr.write(
"plugin needs to pass deck to fact.setModified()")
ankiqt.setModWarningShown = True
deck = ankiqt.mw.deck
assert deck
self.spaceUntil = stripHTMLMedia(u" ".join(