From 0eaf03a9b3b67f7c2c7f2eb69deab41fcd1c6ecb Mon Sep 17 00:00:00 2001 From: ospalh Date: Mon, 4 Jun 2012 16:19:59 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20redundant=20connect=20to=20clicked().?= =?UTF-8?q?=20A=20QDialogButtonBox::Close=20StandardButton=20has=20the=20R?= =?UTF-8?q?ejectRole.=20(http://doc.qt.nokia.com/4.7-snapshot/qdialogbutto?= =?UTF-8?q?nbox.html#StandardButton-enum)=20So=20when=20that=20is=20clicke?= =?UTF-8?q?d,=20that=20button=E2=80=99s=20clicked()=20signal=20as=20well?= =?UTF-8?q?=20as=20the=20dialog=E2=80=99s=20rejected()=20signals=20are=20e?= =?UTF-8?q?mitted.=20Connecting=20EditCurrent=E2=80=99s=20onSave()=20to=20?= =?UTF-8?q?both=20was=20redundant.=20It=20looks=20like=20calling=20onSave(?= =?UTF-8?q?)=20twice=20was=20mostly=20harmless,=20but=20not=20quite:=20Whe?= =?UTF-8?q?n=20closing=20the=20edit=20dialog,=20media=20on=20the=20edited?= =?UTF-8?q?=20card=E2=80=99s=20front=20side=20were=20played=20twice=20(via?= =?UTF-8?q?=20moveToState=20...=20Reviewer.showQuestion()).=20So=20avoid?= =?UTF-8?q?=20that.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aqt/editcurrent.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/aqt/editcurrent.py b/aqt/editcurrent.py index 56b94755e..87cd95c10 100644 --- a/aqt/editcurrent.py +++ b/aqt/editcurrent.py @@ -23,9 +23,6 @@ class EditCurrent(QDialog): self.setWindowTitle(_("Edit Current")) self.setMinimumHeight(400) self.setMinimumWidth(500) - self.connect(self.form.buttonBox.button(QDialogButtonBox.Close), - SIGNAL("clicked()"), - self.onSave) self.connect(self, SIGNAL("rejected()"), self.onSave)