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

VisionProviderSubPanel_Settings.hasOptions now returns False based on supportedSettings instead of sizerDict #10504

Merged
merged 1 commit into from
Nov 19, 2019
Merged

VisionProviderSubPanel_Settings.hasOptions now returns False based on supportedSettings instead of sizerDict #10504

merged 1 commit into from
Nov 19, 2019

Conversation

LeonarddeR
Copy link
Collaborator

Link to issue number:

Follow up of #10082

Summary of the issue:

For a provider that only has runtime settings and uses the VisionProviderSubPanel_Wrapper, the VisionProviderSubPanel_Settings would be properly hidden if the provider is disabled. After enabling and disabling the provider, the empty panel is still shown and can receive keyboard access.

Description of how this pull request fixes the issue:

Whether a panel had options was based on the sizerDict. However, for performance reasons, the sizerDict isn't cleared when updating the driver settings, the sizers for unsupported settings are only hidden. the sizerDict still remains populated.

This pr bases the hasOptions property on the supportedSettings property of the AutoSettings instance. It also moves the property to AutoSettingsMixin, since it's abstract enough to live there.

Testing performed:

Tested enabling and disabling of a provider with only runtime settings. Ensured that after disabling, the whole panel disappeared. Enabling the provider again reintroduced the panel along with its settings.

Known issues with pull request:

None

Change log entry:

None

Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

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

Thanks @LeonarddeR

@feerrenrut
Copy link
Contributor

Before I merge this, can you confirm that the example provider still works?

@LeonarddeR
Copy link
Collaborator Author

Yep, it does work as expected.

@feerrenrut
Copy link
Contributor

Thanks @LeonarddeR

@feerrenrut feerrenrut merged commit b58f00a into nvaccess:master Nov 19, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Nov 19, 2019
@LeonarddeR LeonarddeR deleted the VisionProviderSubPanel_Settings branch November 21, 2019 09:09
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.

3 participants