diff --git a/Orange/widgets/visualize/owradviz.py b/Orange/widgets/visualize/owradviz.py index 2cbd6b141d5..247dfcda34f 100644 --- a/Orange/widgets/visualize/owradviz.py +++ b/Orange/widgets/visualize/owradviz.py @@ -275,7 +275,6 @@ class OWRadviz(OWAnchorProjectionWidget): graph = SettingProvider(OWRadvizGraph) class Warning(OWAnchorProjectionWidget.Warning): - no_features = widget.Msg("Radviz requires at least two features.") invalid_embedding = widget.Msg("No projection for selected features") removed_vars = widget.Msg("Categorical variables with more than" " two values are not shown.") @@ -331,12 +330,6 @@ def __vizrank_set_attrs(self, attrs): def __model_selected_changed(self): self.selected_vars = [(var.name, vartype(var)) for var in self.model_selected] - - self.Warning.no_features.clear() - if len(self.model_selected) < 2: - self.Warning.no_features() - return - self.init_projection() self.setup_plot() self.commit() diff --git a/Orange/widgets/visualize/tests/test_owradviz.py b/Orange/widgets/visualize/tests/test_owradviz.py index 84ba6fbe996..80b4af7ec87 100644 --- a/Orange/widgets/visualize/tests/test_owradviz.py +++ b/Orange/widgets/visualize/tests/test_owradviz.py @@ -101,3 +101,16 @@ def test_discrete_attributes(self): self.assertTrue(self.widget.Warning.removed_vars.is_shown()) self.send_signal(self.widget.Inputs.data, None) self.assertFalse(self.widget.Warning.removed_vars.is_shown()) + + def test_saved_selected_vars(self): + self.send_signal(self.widget.Inputs.data, self.data) + + self.widget.model_selected[:] = self.data.domain[:1] + self.widget.variables_selection.removed.emit() + self.send_signal(self.widget.Inputs.data, self.data) + self.assertEqual(len(self.widget.model_selected[:]), 1) + + self.widget.model_selected[:] = self.data.domain[:0] + self.widget.variables_selection.removed.emit() + self.send_signal(self.widget.Inputs.data, self.data) + self.assertEqual(len(self.widget.model_selected[:]), 4)