mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
allow for the fact that field font/size may be null
This commit is contained in:
parent
647ec63677
commit
f41d2c2e0a
1 changed files with 2 additions and 2 deletions
|
@ -152,8 +152,8 @@ class View(object):
|
||||||
fn = u"Arial"
|
fn = u"Arial"
|
||||||
for fm in self.main.currentCard.fact.model.fieldModels:
|
for fm in self.main.currentCard.fact.model.fieldModels:
|
||||||
if fm.name == self.main.currentCard.cardModel.typeAnswer:
|
if fm.name == self.main.currentCard.cardModel.typeAnswer:
|
||||||
sz = fm.quizFontSize
|
sz = fm.quizFontSize or sz
|
||||||
fn = fm.quizFontFamily
|
fn = fm.quizFontFamily or fn
|
||||||
break
|
break
|
||||||
st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
|
st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
|
||||||
ok = st % (passedCharColour, sz, fn)
|
ok = st % (passedCharColour, sz, fn)
|
||||||
|
|
Loading…
Reference in a new issue