Skip to content

Conversation

@rjwills28
Copy link
Contributor

This PR addresses issues that were discovered while testing the 'not_enabled' behaviour of control widgets when relating to a PV which has the 'no-write' property. Please see #3368 for a full list of issues and discussion.

Summary of changes:

  • I have created a generic method to apply the 'not_enabled' style and mouse cursor that can be called from all control widgets to make the behaviour consistent across widgets (setDisabledLook(...)).
  • An ActionButton will be shown as 'not_enabled' if it has a single action to write to a no-write PV. This is the only case where this will be true as if an ActionButton has multiple actions then it should still be shown as enabled even if one of those actions is to write to a no-write PV.
  • Don't use the .setDisable(true) as this removes the context menu from the widget.
  • Check the enabled status before trying to write to a PV to stop exceptions being thrown in the logs.
  • Update the .not_enabled css class so that widgets do not show hover-over or click color changes when they should look 'disabled' - see video of interactions with a ChoiceButton in issue Display of widgets for 'no_write' PVs #3368

rjwills28 added 4 commits May 27, 2025 16:53
... to apply the not_enabled css style to the widget and
show the no_write cursor.
…method

... in parent for consistent and uniform behaviour across widgets.

Some widgets were being disabled which removes the context menu so these have
been switched ot just apply the style.

In addition some widgets were still trying to write to 'no_write' PVs
causing exceptions in the log. These have been fixed by changing whether
the widget is enabled first.
This should occur when there is only a single action to write to a PV
that is non-writeable. In any other case the actionbutton should be
enabled to run other actions attached to it.
@shroffk shroffk merged commit bba61b4 into ControlSystemStudio:master Jun 3, 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