Skip to content

Commit

Permalink
Merge pull request #5836 from VesnaT/fix_set_data
Browse files Browse the repository at this point in the history
[FIX] Decorate overridden input data handler
  • Loading branch information
markotoplak authored Feb 9, 2022
2 parents c38b96f + 590634e commit 320475f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Orange/widgets/model/owcurvefit.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def __insert_into_expression(self, what: str, offset=0):
self.__expression_edit.setCursorPosition(pos + len(what) - offset)
self.__expression_edit.setFocus()

@OWBaseLearner.Inputs.data
def set_data(self, data: Optional[Table]):
self.Warning.data_missing(shown=not bool(data))
self.learner = None
Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/model/owsvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def _on_kernel_changed(self):
self._show_right_kernel()
self.settings_changed()

@OWBaseLearner.Inputs.data
def set_data(self, data):
self.Warning.sparse_data.clear()
super().set_data(data)
Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/utils/tests/concurrent_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def on_exception(self, ex: Exception):
raise ex

# OWDataProjectionWidget
@OWDataProjectionWidget.Inputs.data
def set_data(self, data: Table):
super().set_data(data)
if self._invalidated:
Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/visualize/owfreeviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def on_exception(self, ex: Exception):
self.run_button.setText("Start")

# OWAnchorProjectionWidget
@OWAnchorProjectionWidget.Inputs.data
def set_data(self, data):
super().set_data(data)
self.graph.set_sample_size(None)
Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/visualize/owlinearprojection.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def colors_changed(self):
super().colors_changed()
self._init_vizrank()

@OWAnchorProjectionWidget.Inputs.data
def set_data(self, data):
super().set_data(data)
self._check_options()
Expand Down
1 change: 1 addition & 0 deletions Orange/widgets/visualize/owradviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def colors_changed(self):
super().colors_changed()
self._init_vizrank()

@OWAnchorProjectionWidget.Inputs.data
def set_data(self, data):
super().set_data(data)
self._init_vizrank()
Expand Down
2 changes: 2 additions & 0 deletions Orange/widgets/visualize/owscatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def _vizrank_color_change(self):
self.vizrank_button.setEnabled(not err_msg)
self.vizrank_button.setToolTip(err_msg)

@OWDataProjectionWidget.Inputs.data
def set_data(self, data):
super().set_data(data)
self._vizrank_color_change()
Expand Down Expand Up @@ -558,6 +559,7 @@ def switch_sampling(self):
self.add_data()
self.__timer.start()

@OWDataProjectionWidget.Inputs.data_subset
def set_subset_data(self, subset_data):
self.warning()
if isinstance(subset_data, SqlTable):
Expand Down

0 comments on commit 320475f

Please sign in to comment.