Skip to content

Commit f626e12

Browse files
committed
settings compatibility with old domain handler
1 parent ad7a9a2 commit f626e12

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Orange/widgets/settings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,14 @@ def encode_domain(self, domain):
310310

311311
return attributes, class_vars, metas
312312

313-
new_context = ContextHandler.new_context
313+
def new_context(self, domain, *args):
314+
"""Create a new context."""
315+
context = ContextHandler.new_context(self)
316+
# dummy .attributes and .metas make these settings loadable with DomainContextHandler,
317+
# and they only influence perfect domain matching
318+
context.attributes = {"dummy": "compat"}
319+
context.metas = {}
320+
return context
314321

315322
@classmethod
316323
def _var_exists(cls, setting, value, attributes, class_vars, metas):

0 commit comments

Comments
 (0)