diff --git a/pylib/tools/hookslib.py b/pylib/tools/hookslib.py index 511dfdfd7..c3539cf44 100644 --- a/pylib/tools/hookslib.py +++ b/pylib/tools/hookslib.py @@ -139,7 +139,7 @@ class {self.classname()}: if self.legacy_hook: out += f"""\ # legacy support - runFilter({self.legacy_args()}) + {arg_names[0]} = runFilter({self.legacy_args()}) """ out += f"""\ diff --git a/qt/aqt/gui_hooks.py b/qt/aqt/gui_hooks.py index bd2fb71ea..d80f15f5f 100644 --- a/qt/aqt/gui_hooks.py +++ b/qt/aqt/gui_hooks.py @@ -251,7 +251,7 @@ class _CardWillShowFilter: self._hooks.remove(filter) raise # legacy support - runFilter("prepareQA", text, card, kind) + text = runFilter("prepareQA", text, card, kind) return text @@ -512,7 +512,7 @@ class _EditorDidUnfocusFieldFilter: self._hooks.remove(filter) raise # legacy support - runFilter("editFocusLost", changed, note, current_field_idx) + changed = runFilter("editFocusLost", changed, note, current_field_idx) return changed @@ -591,7 +591,7 @@ class _EditorWillUseFontForFieldFilter: self._hooks.remove(filter) raise # legacy support - runFilter("mungeEditingFontName", font) + font = runFilter("mungeEditingFontName", font) return font @@ -1034,7 +1034,7 @@ class _StyleDidInitFilter: self._hooks.remove(filter) raise # legacy support - runFilter("setupStyle", style) + style = runFilter("setupStyle", style) return style