From 4c6301d3ca193e228788f1ada49d4494bc63e4c0 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 17 Aug 2009 05:13:13 +0900 Subject: [PATCH] don't die if there's only one field --- ankiqt/ui/facteditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 2c89a529c..2696b0f74 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -429,7 +429,8 @@ class FactEditor(object): extra = -1 tagsw = self.tagsLabel.sizeHint().width() self.tagsLabel.setFixedWidth(max(tagsw, - max(*[l.width() for l in self.labels])) + max(*([ + l.width() for l in self.labels] + [0]))) + extra) self.parent.setTabOrder(last, self.tags)