[GraphEditor] AttributeItemDelegate: Return valid component for PushButton

The value of a `PushButtonParam` being always `None`, it is necessary
to check that the type of the component is not `PushButtonParam` before
comparing its value to `undefined`. Otherwise, any `PushButtonParam`
will always be represented by a "notComputed" component.
This commit is contained in:
Candice Bentéjac 2024-07-29 17:48:38 +02:00
parent d7d259afa3
commit 45e6f43c40

View file

@ -193,8 +193,8 @@ RowLayout {
Layout.fillWidth: true
sourceComponent: {
if (attribute.value === undefined)
{
// PushButtonParam always has value == undefined, so it needs to be excluded from this check
if (attribute.type != "PushButtonParam" && attribute.value === undefined) {
return notComputed_component
}
switch (attribute.type) {