From 10aa897674ea385a60dec359f43838f52026ac44 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 24 May 2021 14:54:31 +1000 Subject: [PATCH] prevent models.setCurrent() clearing the undo queue --- pylib/anki/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylib/anki/models.py b/pylib/anki/models.py index 154e39314..e4d43e949 100644 --- a/pylib/anki/models.py +++ b/pylib/anki/models.py @@ -170,7 +170,8 @@ class ModelManager: return self.get(NotetypeId(self.all_names_and_ids()[0].id)) def setCurrent(self, m: NotetypeDict) -> None: - self.col.conf["curModel"] = m["id"] + """Legacy. The current notetype is now updated on note add.""" + self.col.set_config("curModel", m["id"]) # Retrieving and creating models #############################################################