[core] Add validValue and errorMessage support for ChoiceParams

ChoiceParams can now also have their `validValue` and `errorMessage`
parameters.

The `validValueChanged` is also emitted whenever a parameter's value
changes. This ensures that the `validValue` parameter is always re-
evaluated when the attribute is updated, even if `validValue` itself does
not change.
This commit is contained in:
Candice Bentéjac 2023-08-22 11:04:37 +02:00
parent e873dbf280
commit e6bf7e6e2d
2 changed files with 5 additions and 2 deletions

View file

@ -196,6 +196,7 @@ class Attribute(BaseObject):
self.requestNodeUpdate()
self.valueChanged.emit()
self.validValueChanged.emit()
def upgradeValue(self, exportedValue):
self._set_value(exportedValue)