mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22: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"
|
||||
for fm in self.main.currentCard.fact.model.fieldModels:
|
||||
if fm.name == self.main.currentCard.cardModel.typeAnswer:
|
||||
sz = fm.quizFontSize
|
||||
fn = fm.quizFontFamily
|
||||
sz = fm.quizFontSize or sz
|
||||
fn = fm.quizFontFamily or fn
|
||||
break
|
||||
st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
|
||||
ok = st % (passedCharColour, sz, fn)
|
||||
|
|
Loading…
Reference in a new issue