From 9902e21cba9c9fbe43d8645a797bf92faef3c09e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 26 Feb 2018 11:21:12 +1100 Subject: [PATCH] fix error when unsetting browser appearance --- aqt/clayout.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aqt/clayout.py b/aqt/clayout.py index da6e24375..a216f4269 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -464,8 +464,9 @@ adjust the template manually to switch the question and answer.""")) t['bfont'] = f.font.currentFont().family() t['bsize'] = f.fontSize.value() else: - del t['bfont'] - del t['bsize'] + for key in ("bfont", "bsize"): + if key in t: + del t[key] def onTargetDeck(self): from aqt.tagedit import TagEdit