From f41d2c2e0abc6a0bb70bcb199df1b615089aa0e6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 27 Dec 2010 01:06:48 +0900 Subject: [PATCH] allow for the fact that field font/size may be null --- ankiqt/ui/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index 495ee14f5..5e93a1b92 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -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)