[FIX] Network Explorer: Clear selection on new network and when removing network#184
[FIX] Network Explorer: Clear selection on new network and when removing network#184janezd wants to merge 1 commit intobiolab:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
==========================================
+ Coverage 75.23% 75.26% +0.03%
==========================================
Files 21 21
Lines 2790 2794 +4
==========================================
+ Hits 2099 2103 +4
Misses 691 691
Continue to review full report at Codecov.
|
|
The |
|
I just tried with a fresh environment. In it
I don't know how to replicate and debug this. And I don't know what could be wrong, actually. BTW, how does it doesn't work? |
VesnaT
left a comment
There was a problem hiding this comment.
I guess, the cleared selection should result on the selected_data output as well, but it does not:
Connect Network File -> Network Explorer -> Data Table (with Selected Data) and select some points. After removing the Network File, selected data retains in Data Table. The same selected data is there after re-connecting Network File to Network Explorer with some other network.
This seems strange, since sending the selected data should be handled in parent widget.
| self.assertIsNotNone(self.widget.selection) | ||
| self.send_signal(self.widget.Inputs.network, None) | ||
| self.assertEqual(self.widget.nSelected, 0) | ||
| self.assertIsNone(self.widget.selection) |
There was a problem hiding this comment.
I prefer testing a widgets behavior to its properties. This test does not assure no selection on the output.
Adding
self.assertIsNone(self.get_output(self.widget.Outputs.selected_data))
results in a failed test.
b4517a9 to
4ebf7c5
Compare
The overriden version did not call |
|
When opening a saved workflow with selected instances, the selection is cleared. Is that intentional? |
|
Here's another one: select some variable for Color. Then remove data. Variable remains selected. I discovered this when fixing the pending selection. This widget does not properly reset itself because it does not call the inherited methods for this. The reason is, as I recall, that its signals are a bit more complicated. @VesnaT, when we can work together again, we should study this problem together. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #184 +/- ##
==========================================
+ Coverage 74.55% 75.07% +0.52%
==========================================
Files 21 21
Lines 2916 2921 +5
==========================================
+ Hits 2174 2193 +19
+ Misses 742 728 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Issue
Fixes #111.
Includes