From c7d8700054e9cd5235aa761c36d124750c231625 Mon Sep 17 00:00:00 2001 From: bluegreenmagick Date: Thu, 25 Feb 2021 07:34:01 +0900 Subject: [PATCH] StudyDeck without add button --- qt/aqt/studydeck.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qt/aqt/studydeck.py b/qt/aqt/studydeck.py index d44ff1d26..32c656f9e 100644 --- a/qt/aqt/studydeck.py +++ b/qt/aqt/studydeck.py @@ -37,8 +37,6 @@ class StudyDeck(QDialog): geomKey: str = "default", ) -> None: QDialog.__init__(self, parent or mw) - if buttons is None: - buttons = [] self.mw = mw self.form = aqt.forms.studydeck.Ui_Dialog() self.form.setupUi(self) @@ -52,7 +50,7 @@ class StudyDeck(QDialog): self.form.buttonBox.removeButton( self.form.buttonBox.button(QDialogButtonBox.Cancel) ) - if buttons: + if buttons is not None: for b in buttons: self.form.buttonBox.addButton(b, QDialogButtonBox.ActionRole) else: