From 2dc4f0e89818851b785145b5047b1ebeffba3097 Mon Sep 17 00:00:00 2001 From: janezd Date: Thu, 1 Aug 2019 17:24:23 +0200 Subject: [PATCH] OWHeatMap: Store and retrieve selections --- Orange/widgets/visualize/owheatmap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Orange/widgets/visualize/owheatmap.py b/Orange/widgets/visualize/owheatmap.py index 76034f647a8..083fec9c1a8 100644 --- a/Orange/widgets/visualize/owheatmap.py +++ b/Orange/widgets/visualize/owheatmap.py @@ -427,6 +427,7 @@ class Outputs: palette_index = settings.Setting(_default_palette_index) column_label_pos = settings.Setting(PositionTop) + selected_rows = settings.Setting(None, schema_only=True) auto_commit = settings.Setting(True) @@ -454,6 +455,7 @@ class Warning(widget.OWWidget.Warning): def __init__(self): super().__init__() + self.__pending_selection = self.selected_rows # set default settings self.space_x = 10 @@ -719,7 +721,13 @@ def set_dataset(self, data=None): self.openContext(self.data) if self.annotation_index >= len(self.annotation_vars): self.annotation_index = 0 + self.update_heatmaps() + if data is not None and self.__pending_selection is not None: + self.selection_manager.select_rows(self.__pending_selection) + self.selected_rows = self.__pending_selection + self.__pending_selection = None + self.unconditional_commit() def update_heatmaps(self):