select current card in card layout from edit current

This commit is contained in:
Damien Elmes 2018-07-23 12:54:26 +10:00
parent b599b6b26c
commit 0fc0616ad1

View File

@ -22,6 +22,7 @@ class EditCurrent(QDialog):
self.form.buttonBox.button(QDialogButtonBox.Close).setShortcut(
QKeySequence("Ctrl+Return"))
self.editor = aqt.editor.Editor(self.mw, self.form.fieldsArea, self)
self.editor.card = self.mw.reviewer.card
self.editor.setNote(self.mw.reviewer.card.note(), focusTo=0)
restoreGeom(self, "editcurrent")
addHook("reset", self.onReset)