Skip to content

Commit 6ed52bd

Browse files
committed
Fix owfile and owcolor for new storeSpecificSettings semantics
storeSpecificSetting is now called if there is no current context
1 parent bc4c3ee commit 6ed52bd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Orange/widgets/data/owcolor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ def set_data(self, data):
367367

368368
def storeSpecificSettings(self):
369369
# Store the colors that were changed -- but not others
370+
if self.current_context is None:
371+
return
370372
self.current_context.disc_data = \
371373
[(var.name, var.values, "colors" in var.attributes and var.colors)
372374
for var in self.disc_colors]

Orange/widgets/data/owfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,8 @@ def _describe(self, table):
434434
return text
435435

436436
def storeSpecificSettings(self):
437+
if self.current_context is None:
438+
return
437439
self.current_context.modified_variables = self.variables[:]
438440

439441
def retrieveSpecificSettings(self):

0 commit comments

Comments
 (0)