require a reset after any edits

This commit is contained in:
Damien Elmes 2011-04-16 04:23:57 +09:00
parent a07f62b507
commit 2c7a939073
3 changed files with 3 additions and 2 deletions

View file

@ -169,12 +169,12 @@ question or answer on all cards."""), help="AddItems")
def reject(self):
if not self.canClose():
return
removeHook('reset', self.onReset)
clearAudioQueue()
self.removeTempFact(self.editor.fact)
self.editor.setFact(None)
self.modelChooser.cleanup()
self.mw.maybeReset()
removeHook('reset', self.onReset)
saveGeom(self, "add")
aqt.dialogs.close("AddCards")
QDialog.reject(self)

View file

@ -312,6 +312,7 @@ class Editor(object):
if str.startswith("blur") or str.startswith("key"):
(type, txt) = str.split(":", 1)
self.fact.fields[self.currentField] = self.mungeHTML(txt)
self.mw.requireReset()
if type == "blur":
if not self._keepButtons:
self.disableButtons()

View file

@ -153,7 +153,7 @@ class AnkiQt(QMainWindow):
%s<br>
%s</div></div></center>
""" % (_("Close the editing window to resume."),
self.button("refresh", _("Return"))), css=self.sharedCSS)
self.button("refresh", _("Resume Now"))), css=self.sharedCSS)
# HTML helpers
##########################################################################