I want to do a simple check when a user clicks a boolean parameter in a parameter tree. If the operation is valid, the parameter should change normally. If it's invalid, it should leave the box checked and log a warning. I thought this would be pretty simple by connecting a check function to sigStateChanging, however this signal does not appear to be emitted by the parameter. I tried to implement the same thing with sigStateChanged which kida worked. It will output the warning and leave the state intact, but the checkbox for the parameter stays un-checked even though the value of the parameter is True. Is there a way to:
- Emit sigStateChanging from the parameter
- Change the display of the checkbox in the GUI to match the state of the parameter
Thanks!