[FIX] Scatter Plot: two minor errors#2381
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2381 +/- ##
==========================================
- Coverage 74.25% 74.22% -0.04%
==========================================
Files 320 320
Lines 55786 55785 -1
==========================================
- Hits 41425 41405 -20
- Misses 14361 14380 +19 |
|
|
||
| def assure_attribute_present(self, attr): | ||
| if attr not in self.data.domain: | ||
| if self.data and attr not in self.data.domain: |
| self.vizrank_button.setEnabled( | ||
| self.data is not None and self.data.domain.class_var is not None | ||
| and len(self.data.domain.attributes) > 1 and len(self.data) > 1) | ||
| self._vizrank_button_enabled() |
There was a problem hiding this comment.
I suppose that the bug that you are fixing here is that the button was not enabled when it should have been. This shouldn't be "fixed" so that the button is always enabled. These conditions were correct, so the bug -- the reason that this line was not executed -- must be somewhere else.
You should find the actual error and fix it instead of removing the code that (I suppose) works.
There was a problem hiding this comment.
Well, I moved code somewhere else. Now I have put it back here and added check for sparse.
|
|
||
| def sparse_to_dense(self, input_data=None): | ||
| self.vizrank_button.setEnabled(not (self.data and self.data.is_sparse())) | ||
| self._vizrank_button_enabled() |
|
What should I do to reproduce the error? Please provide actual descriptions; these screenshots are not informative. |
|
@janezd : Instructions to reproduce these two errors are now added above. |
Issue
Steps to reproduce the behavior
Put Scatter Plot widget on the canvas. Then try to change shape. Select (Same shape).
Steps to reproduce the behavior
Put Scatter Plot widget on the canvas. Then do something. For instance, try to change color. Find Informative Projections button enables and it crashes when an user starts vizrank.
Description of changes
Includes