Skip to content

Commit

Permalink
Merge pull request #897 from astaric/store-specific-on-save
Browse files Browse the repository at this point in the history
Fix saving of settings in owcolors widget
  • Loading branch information
janezd committed Dec 6, 2015
2 parents eb975cd + d8c1b30 commit c7b9457
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Orange/widgets/data/owcolor.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ def create_part(variables):
def storeSpecificSettings(self):
# Store the colors that were changed -- but not others
self.current_context.disc_data = \
[(var.name, var.values, "_colors" in var.attributes and var.colors)
[(var.name, var.values, "colors" in var.attributes and var.colors)
for var in self.disc_colors]
self.current_context.cont_data = \
[(var.name, "_colors" in var.attributes and var.colors)
[(var.name, "colors" in var.attributes and var.colors)
for var in self.cont_colors]

def retrieveSpecificSettings(self):
Expand Down
2 changes: 2 additions & 0 deletions Orange/widgets/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ def update_defaults(self, widget):
global context (i.e. `widget.context_settings is not
self.global_contexts`); this happens when the widget was initialized by
an instance-specific data that was passed to :obj:`initialize`."""
self.settings_from_widget(widget)

super().update_defaults(widget)
globs = self.global_contexts
if widget.context_settings is not globs:
Expand Down

0 comments on commit c7b9457

Please sign in to comment.