[ENH] Edit Domain: Change types of multiple variables#6426
Merged
markotoplak merged 3 commits intobiolab:masterfrom Jun 29, 2023
Merged
[ENH] Edit Domain: Change types of multiple variables#6426markotoplak merged 3 commits intobiolab:masterfrom
markotoplak merged 3 commits intobiolab:masterfrom
Conversation
f420bc6 to
160abf0
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #6426 +/- ##
==========================================
+ Coverage 87.63% 87.66% +0.02%
==========================================
Files 321 321
Lines 69254 69374 +120
==========================================
+ Hits 60693 60816 +123
+ Misses 8561 8558 -3 |
160abf0 to
3a86a90
Compare
5742454 to
83ef78e
Compare
Member
|
/rebase |
83ef78e to
0485d6a
Compare
Member
|
@janezd, just to double check: if I understood this code correctly, it does not in any way change how settings are stored (because they are always saved per variable), and we thus do not need to increase the settings version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #6088.
Based on #6415 to avoid conflicts.
Description of changes
Allows changing the variable type for multiple variables at once.
As discussed with @markotoplak, editing other properties, even labels, would be confusing because controls would have to be disabled if selected variables differ in those properties. Also, the widget already has over 3000 lines of complex code.
The only feature we could easily add would be a tri-state checkbox for unlinking.
The widget has four separate editors for different variable types, which are stacked into a single editor. This PR implements a fifth editor, which is blank (except for the combo with type) and can handle multiple variables. Existing editors are kept as they are, that is, they accept a single variable. The "top editor" has separate methods for single and multiple variables. One might think that the four editors could accept lists instead of single variables to avoid having duplicated methods in the top editor. I thought so for long time, too, but the code was just getting more and more complex. This solution is simpler.
Includes