mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
pass current card to drawquestion/answer filter
This commit is contained in:
parent
c21ea725b6
commit
e508239998
2 changed files with 6 additions and 4 deletions
|
@ -1055,9 +1055,11 @@ class PreviewDialog(QDialog):
|
|||
self.dialog.webView.setHtml(
|
||||
('<html><head>%s</head><body>' % getBase(self.deck)) +
|
||||
"<style>" + styles + "</style>" +
|
||||
runFilter("drawQuestion", mungeQA(self.deck, c.htmlQuestion())) +
|
||||
runFilter("drawQuestion", mungeQA(self.deck, c.htmlQuestion()),
|
||||
c) +
|
||||
"<br><br><hr><br><br>" +
|
||||
runFilter("drawAnswer", mungeQA(self.deck, c.htmlAnswer()))
|
||||
runFilter("drawAnswer", mungeQA(self.deck, c.htmlAnswer()),
|
||||
c)
|
||||
+ "</body></html>")
|
||||
playFromText(c.question)
|
||||
playFromText(c.answer)
|
||||
|
|
|
@ -137,7 +137,7 @@ class View(object):
|
|||
height = 35
|
||||
else:
|
||||
height = 45
|
||||
q = runFilter("drawQuestion", q)
|
||||
q = runFilter("drawQuestion", q, self.main.currentCard)
|
||||
self.write(self.center(self.mungeQA(self.main.deck, q), height))
|
||||
if self.state != self.oldState and not nosound:
|
||||
playFromText(q)
|
||||
|
@ -170,7 +170,7 @@ class View(object):
|
|||
def drawAnswer(self):
|
||||
"Show the answer."
|
||||
a = self.main.currentCard.htmlAnswer()
|
||||
a = runFilter("drawAnswer", a)
|
||||
a = runFilter("drawAnswer", a, self.main.currentCard)
|
||||
if self.main.currentCard.cardModel.typeAnswer:
|
||||
try:
|
||||
cor = stripHTML(self.main.currentCard.fact[
|
||||
|
|
Loading…
Reference in a new issue