Remove redundant connect to clicked().

A QDialogButtonBox::Close StandardButton has the RejectRole.
(http://doc.qt.nokia.com/4.7-snapshot/qdialogbuttonbox.html#StandardButton-enum)
So when that is clicked, that button’s clicked() signal
as well as the dialog’s rejected() signals are emitted.
Connecting EditCurrent’s onSave() to both was redundant.
It looks like calling onSave() twice was mostly harmless,
but not quite:
When closing the edit dialog, media on the edited card’s front side
were played twice (via moveToState ... Reviewer.showQuestion()).
So avoid that.
This commit is contained in:
ospalh 2012-06-04 16:19:59 +02:00
parent df89d6e4b9
commit 0eaf03a9b3

View file

@ -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)