[FIX] Scatter Plot: Scatter Plot automatically sends selection#2649
[FIX] Scatter Plot: Scatter Plot automatically sends selection#2649janezd merged 1 commit intobiolab:masterfrom jerneju:scatterplot-send-selection
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2649 +/- ##
==========================================
- Coverage 75.52% 75.52% -0.01%
==========================================
Files 332 332
Lines 58037 58046 +9
==========================================
+ Hits 43832 43838 +6
- Misses 14205 14208 +3 |
| def selection_changed(self): | ||
| self.send_data() | ||
| if self.auto_send_selection: | ||
| self.send_data() |
There was a problem hiding this comment.
This half-reimplements the logic of Orange.widgets.gui.auto_commit. This does not work:
- disable auto commit,
- select some points,
- enable auto commit.
Selected points are not sent.
The auto_commit function has a local variable dirty, which you would have to sent, but can't access from here.
A solution that would work would be to simply call self.commit instead of directly calling self.send_data. A (slight) problem with this is that it would re-send features when the selection is changed. This could be prevented by storing the last sent features and not sending them when not needed. Not most elegant solution, though.
| check_select(False) | ||
| self.assertIsNone(self.get_output(self.widget.Outputs.selected_data)) | ||
| check_select(True) | ||
| self.assertIsInstance(self.get_output(self.widget.Outputs.selected_data), Table) |
There was a problem hiding this comment.
Add the test for the scenario I described above.
when the checkbox Send automatically is checked.
Issue
Fixes #2646
Description of changes
Includes