Skip to content

Commit

Permalink
settings compatibility with old domain handler
Browse files Browse the repository at this point in the history
  • Loading branch information
markotoplak committed Feb 23, 2024
1 parent ad7a9a2 commit f626e12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Orange/widgets/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f626e12

Please sign in to comment.