accept Ctrl-Enter to close the edit current dialog

Esc already works, but since the Add dialog accepts it it's nice to have
as well.
This commit is contained in:
Soren I. Bjornstad 2014-08-31 14:41:08 -05:00
parent f9f007e5c4
commit a0e736ef39

View file

@ -26,6 +26,8 @@ class EditCurrent(QDialog):
self.connect(self, self.connect(self,
SIGNAL("rejected()"), SIGNAL("rejected()"),
self.onSave) self.onSave)
self.form.buttonBox.button(QDialogButtonBox.Close).setShortcut(
QKeySequence("Ctrl+Return"))
self.editor = aqt.editor.Editor(self.mw, self.form.fieldsArea, self) self.editor = aqt.editor.Editor(self.mw, self.form.fieldsArea, self)
self.editor.setNote(self.mw.reviewer.card.note()) self.editor.setNote(self.mw.reviewer.card.note())
restoreGeom(self, "editcurrent") restoreGeom(self, "editcurrent")