mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
require a reset after any edits
This commit is contained in:
parent
a07f62b507
commit
2c7a939073
3 changed files with 3 additions and 2 deletions
|
@ -169,12 +169,12 @@ question or answer on all cards."""), help="AddItems")
|
||||||
def reject(self):
|
def reject(self):
|
||||||
if not self.canClose():
|
if not self.canClose():
|
||||||
return
|
return
|
||||||
|
removeHook('reset', self.onReset)
|
||||||
clearAudioQueue()
|
clearAudioQueue()
|
||||||
self.removeTempFact(self.editor.fact)
|
self.removeTempFact(self.editor.fact)
|
||||||
self.editor.setFact(None)
|
self.editor.setFact(None)
|
||||||
self.modelChooser.cleanup()
|
self.modelChooser.cleanup()
|
||||||
self.mw.maybeReset()
|
self.mw.maybeReset()
|
||||||
removeHook('reset', self.onReset)
|
|
||||||
saveGeom(self, "add")
|
saveGeom(self, "add")
|
||||||
aqt.dialogs.close("AddCards")
|
aqt.dialogs.close("AddCards")
|
||||||
QDialog.reject(self)
|
QDialog.reject(self)
|
||||||
|
|
|
@ -312,6 +312,7 @@ class Editor(object):
|
||||||
if str.startswith("blur") or str.startswith("key"):
|
if str.startswith("blur") or str.startswith("key"):
|
||||||
(type, txt) = str.split(":", 1)
|
(type, txt) = str.split(":", 1)
|
||||||
self.fact.fields[self.currentField] = self.mungeHTML(txt)
|
self.fact.fields[self.currentField] = self.mungeHTML(txt)
|
||||||
|
self.mw.requireReset()
|
||||||
if type == "blur":
|
if type == "blur":
|
||||||
if not self._keepButtons:
|
if not self._keepButtons:
|
||||||
self.disableButtons()
|
self.disableButtons()
|
||||||
|
|
|
@ -153,7 +153,7 @@ class AnkiQt(QMainWindow):
|
||||||
%s<br>
|
%s<br>
|
||||||
%s</div></div></center>
|
%s</div></div></center>
|
||||||
""" % (_("Close the editing window to resume."),
|
""" % (_("Close the editing window to resume."),
|
||||||
self.button("refresh", _("Return"))), css=self.sharedCSS)
|
self.button("refresh", _("Resume Now"))), css=self.sharedCSS)
|
||||||
|
|
||||||
# HTML helpers
|
# HTML helpers
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in a new issue