From 76bd51a7c3e6fe75f673c5c83034bf3a7b600787 Mon Sep 17 00:00:00 2001 From: Abdo Date: Sat, 9 Oct 2021 03:26:10 +0300 Subject: [PATCH] Fix deck change after toggling sticky fields (#1415) (cherry picked from commit ebe7125e8123c2b5ac5490d99a20207690bd8b7d) --- qt/aqt/editor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index cf84cc982..ec96cfff7 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -405,7 +405,9 @@ $editorToolbar.then(({{ toolbar }}) => toolbar.appendGroup({{ result.append(fld["sticky"]) - update_notetype_legacy(parent=self.mw, notetype=model).run_in_background() + update_notetype_legacy(parent=self.mw, notetype=model).run_in_background( + initiator=self + ) return result @@ -418,7 +420,9 @@ $editorToolbar.then(({{ toolbar }}) => toolbar.appendGroup({{ new_state = not fld["sticky"] fld["sticky"] = new_state - update_notetype_legacy(parent=self.mw, notetype=model).run_in_background() + update_notetype_legacy(parent=self.mw, notetype=model).run_in_background( + initiator=self + ) return new_state