mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
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:
parent
df89d6e4b9
commit
0eaf03a9b3
1 changed files with 0 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue