mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
limit plugin warning to once a session
This commit is contained in:
parent
98597dd56d
commit
49b744f77d
1 changed files with 4 additions and 2 deletions
|
@ -135,9 +135,11 @@ class Fact(object):
|
||||||
if textChanged:
|
if textChanged:
|
||||||
if not deck:
|
if not deck:
|
||||||
# FIXME: compat code
|
# FIXME: compat code
|
||||||
import sys; sys.stderr.write(
|
|
||||||
"plugin needs to pass deck to fact.setModified()")
|
|
||||||
import ankiqt
|
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
|
deck = ankiqt.mw.deck
|
||||||
assert deck
|
assert deck
|
||||||
self.spaceUntil = stripHTMLMedia(u" ".join(
|
self.spaceUntil = stripHTMLMedia(u" ".join(
|
||||||
|
|
Loading…
Reference in a new issue