Skip to content
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

Make Scrollable group respect visible_when #1555

Merged
merged 10 commits into from
Mar 26, 2021

Conversation

aaronayres35
Copy link
Contributor

Note: this PR sits on top of #1552 as it uses IsVisible to write a regression test. 1552 should be merged first, and any changes from PR review suggestions should be merged in here.

Currently the diff on this PR is ugly as a result. The only relevant files being changed here are traitsui/qt4/ui_panel.py and traitsui/qt4/tests/test_ui_panel.py.

fixes #1512

The problem code was setting up an editor to hook up the enabled_when and visible_when checks for the group using the control for the contained widget. In reality, if we had a scrollable group, we want these to get hooked up for the QScrollArea containing that widget not just the widget itself. Simply moving the conditional for handling scrollable groups before handling the group's enabled/visible when checks solves this problem.

@aaronayres35 aaronayres35 changed the title Fix/1512 scrollable group visible when Make Scrollable group respect visible_when Mar 25, 2021
Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. That was quick :D. I tested this fix with the code in #1512 and it works as expected now.

@aaronayres35 aaronayres35 merged commit 565301a into master Mar 26, 2021
@aaronayres35 aaronayres35 deleted the fix/1512-scrollable-group-visible_when branch March 26, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollable Group cannot become non-visible
2 participants