From 81b01f309c9428030cabe8f0d78bea93bb6c3e8e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 25 May 2012 11:49:50 +0900 Subject: [PATCH] make sure we don't show 'add' in note type selection --- aqt/studydeck.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aqt/studydeck.py b/aqt/studydeck.py index 2fd04596a..c3d6e6c63 100644 --- a/aqt/studydeck.py +++ b/aqt/studydeck.py @@ -21,8 +21,9 @@ class StudyDeck(QDialog): if not cancel: self.form.buttonBox.removeButton( self.form.buttonBox.button(QDialogButtonBox.Cancel)) - for b in buttons: - self.form.buttonBox.addButton(b, QDialogButtonBox.ActionRole) + if buttons: + for b in buttons: + self.form.buttonBox.addButton(b, QDialogButtonBox.ActionRole) else: b = QPushButton(_("Add")) b.setShortcut(QKeySequence("Ctrl+N"))