mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
work around race condition in edit current close
This commit is contained in:
parent
16ae17038e
commit
dd57ed693f
1 changed files with 4 additions and 2 deletions
|
@ -29,7 +29,7 @@ class EditCurrent(QDialog):
|
||||||
restoreGeom(self, "editcurrent")
|
restoreGeom(self, "editcurrent")
|
||||||
addHook("reset", self.onReset)
|
addHook("reset", self.onReset)
|
||||||
self.mw.requireReset(modal=True)
|
self.mw.requireReset(modal=True)
|
||||||
self.exec_()
|
self.open()
|
||||||
# reset focus after open
|
# reset focus after open
|
||||||
self.editor.web.setFocus()
|
self.editor.web.setFocus()
|
||||||
|
|
||||||
|
@ -47,4 +47,6 @@ class EditCurrent(QDialog):
|
||||||
r.card.load()
|
r.card.load()
|
||||||
self.mw.moveToState("review")
|
self.mw.moveToState("review")
|
||||||
saveGeom(self, "editcurrent")
|
saveGeom(self, "editcurrent")
|
||||||
self.close()
|
# close()ing immediately causes intermittent crashes on osx
|
||||||
|
self.hide()
|
||||||
|
self.mw.progress.timer(2000, self.close, False)
|
||||||
|
|
Loading…
Reference in a new issue