[FIX] Distributions: Fix selection output#6578
Conversation
a537ec7 to
1856db3
Compare
|
The same setting is now used to store something else. Thus we should be careful. The safest option is to use some other name than If old behavior was invalid, migration does not make much sense, or does it? It was fine when not sorted, true? Then migration could be useful if that was the majority use case. |
|
A sensible migration would be to keep the selection if there was no ordering, because in this case it worked, and to clear it otherwise. Unfortunately, the selection is a context setting and ordering is not. Clearing a context dependent setting depending on a non-context would be hacky. I don't think we'll get any crashes because of not migrate anything, because There's another problem. The current code is already broken and this PR doesn't change it. Draw a distribution for Iris and select the last class. Now put Iris through Select Rows and remove one of the classes (check purging checkboxes, too). Put this, binary-class data into Distributions. To fix this, the context would have to depend on the values of the plotted variable, but this would be too strict with regard to other settings. Therefore |
Actually, with this dependency it could work quite cleanly. I think
That is a relief, thanks. |
I agree. Storing value indices in settings is probably always wrong, except if contexts ensure the same content/ordering (which is most often impractical, as you pointed out). |
1856db3 to
9254145
Compare
9254145 to
6ce7f67
Compare
|
@markotoplak, I've fixed it differently now. It now also fixes the crash when a selected value no longer appears in a new input data. For the latter fix, |
b80d9c5 to
1674965
Compare
1674965 to
c2ab198
Compare
c2ab198 to
52a12f7
Compare
|
I tried torturing this but my biggest complaint would be choice of variable names in |
Issue
Fixes #6576.
Description of changes
Instead of storing indices of columns,
self.selectionnow stores selected bar values.Includes