From f626e12ebcff321df2cc21944e8083919dcf0976 Mon Sep 17 00:00:00 2001 From: Marko Toplak Date: Fri, 23 Feb 2024 07:47:10 +0100 Subject: [PATCH] settings compatibility with old domain handler --- Orange/widgets/settings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Orange/widgets/settings.py b/Orange/widgets/settings.py index 1d1d4e67f4e..3b5db65796f 100644 --- a/Orange/widgets/settings.py +++ b/Orange/widgets/settings.py @@ -310,7 +310,14 @@ def encode_domain(self, domain): return attributes, class_vars, metas - new_context = ContextHandler.new_context + def new_context(self, domain, *args): + """Create a new context.""" + context = ContextHandler.new_context(self) + # dummy .attributes and .metas make these settings loadable with DomainContextHandler, + # and they only influence perfect domain matching + context.attributes = {"dummy": "compat"} + context.metas = {} + return context @classmethod def _var_exists(cls, setting, value, attributes, class_vars, metas):