[FIX] OWEditDomain: Clear editor when data is disconnected#4484
[FIX] OWEditDomain: Clear editor when data is disconnected#4484janezd merged 1 commit intobiolab:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4484 +/- ##
==========================================
+ Coverage 83.16% 83.39% +0.22%
==========================================
Files 268 274 +6
Lines 54001 55077 +1076
==========================================
+ Hits 44911 45930 +1019
- Misses 9090 9147 +57 |
janezd
left a comment
There was a problem hiding this comment.
Nice. It's a small glitch, but we should tolerate them.
I don't entirely like the fix, though. It relies on the left-hand listview sending an (essentially invalid) signal that something (in fact: nothing) has been selected. The solution is thus based on a side-effect.
I think this should be explicitly handled by OWEditDomain.clear whose job is to clean up the widget. I suppose OWEditDomain.clear should call self._editor.clear(), where ReinterpretVariableEditor.clear would probably be defined as:
def clear(self):
self.layout().currentWidget().clear()This seems to work, but please check - in particular for any crashes for different current widgets. (Can current widget be None or something else that doesn't have clear?)
Also think whether ReinterpretVariableEditor.clear also needs to do something else. Also check that the corresponding widget's clear methods do everything they need to to clean their houses.
|
Line 1: "should": I meant "shouldn't"! :) |
|
What if we add |
|
OK, you can do so, too, I guess. |
4b52209 to
8221fd3
Compare
Issue
Fixes #4483
Includes