Skip to content

Fix missing context menu for certain controls widgets #3408

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

Merged

Conversation

rjwills28
Copy link
Contributor

Any widget that uses an 'option' for their Confirmation Dialog (e.g. None, On both, on set, etc) is throwing an exception when you right click to display the context menu. This is because this property value cannot be converted to a Boolean.

See ISSUE 3407 for full details.

I have fixed this by also obtaining the propConfirmDialogOptions property and checking whether it is of type ConfirmDialog. If it is then I use logic to convert the enum to a boolean. If it is not then we are in the original case where the Confirmation Dialog is just true/false so we can obtain the value from that. A boolean cannot be converted to a ConfirmDialog enum and a ConfirmDialog enum cannot be converted to a boolean so I think the only way to check this is to grab both property values.

rjwills28 added 2 commits May 21, 2025 10:48
... that use 'options' in their Confirmation Dialog meaning that
this property value cannot be converted to a Boolean and so an
exception is being thrown. See ISSUE 3407.
Previous change is only applicable to control widgets with the
confirm dialog. Other widgets do not have these properties and
so first we should check if they are present.
Copy link
Collaborator

@kasemir kasemir left a comment

Choose a reason for hiding this comment

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

Thanks!

@shroffk shroffk merged commit 59c42e7 into ControlSystemStudio:master May 23, 2025
2 checks passed
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