From 45e6f43c401208845eec62ef848cf03dc8d5d3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Mon, 29 Jul 2024 17:48:38 +0200 Subject: [PATCH] [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. --- meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml index 201c9d2c..b0567a42 100644 --- a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml +++ b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml @@ -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) {