Call Bool before evaluating {enabled/visible}_when condition for labels#1769
Merged
Conversation
Contributor
Author
|
@corranwebster this PR was labelled as a WIP because it does not contain a test but it is a trivial change that fixes the associated issue. I had trouble writing a test for Label {enabled/visible}_when previously (#1544 (comment)) and am not sure I'll have the time to figure that out now. Wanted to get your thoughts on if you think it is safe / worth it to throw this fix into the next release or if we should just hold off. |
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.
closes #1768
WIP label because the still needs a test. support was introduced in #1544, but that needs a test as well. Not sure if I will have the time to write a test on this, but wanted to open a PR with the simple fix now so it isn't forgetten. (previous comment about difficulty I had writing tests for Labels {enabled/visible}_when #1544 (comment))
Note that for "normal" enabled/visible when we have
cond_valuecome up in anifstatement:traitsui/traitsui/ui.py
Line 793 in 87dceb2
In the code here we really do want to always pass a bool to
setVisibleorsetEnabled.Checklist