-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Network Explorer: Clear selection on new network and when removing network #184
base: master
Are you sure you want to change the base?
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Issue
Fixes #111.
Includes