From cc473d22b715dc0497e6e5236c0c424f0e91e451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 12 Dec 2024 18:11:01 +0100 Subject: [PATCH] [GraphEditor] Node: Display connected children when the parent is collapsed Just like any other connected attribute, any child attribute within a Group that is either the source or destination of an edge needs to remain on display, independently from the status of its parent (collapsed or expanded). --- meshroom/ui/qml/GraphEditor/Node.qml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/Node.qml b/meshroom/ui/qml/GraphEditor/Node.qml index c34398301f..d2fc30ee39 100755 --- a/meshroom/ui/qml/GraphEditor/Node.qml +++ b/meshroom/ui/qml/GraphEditor/Node.qml @@ -124,9 +124,10 @@ Item { * it is reset. */ if (Boolean(attribute.enabled)) { - // If the parent's a GroupAttribute, use status of the parent's pin to determine visibility + // If the parent's a GroupAttribute, use status of the parent's pin to determine visibility UNLESS the + // child attribute is already connected if (attribute.root && attribute.root.type === "GroupAttribute") { - var visible = Boolean(parentPins.get(attribute.root.name)) + var visible = Boolean(parentPins.get(attribute.root.name) || attribute.hasOutputConnections || attribute.isLinkNested) if (!visible && parentPins.has(attribute.name) && parentPins.get(attribute.name) === true) { parentPins.set(attribute.name, false) pin.expanded = false @@ -455,7 +456,8 @@ Item { visible: { if (Boolean(modelData.enabled || modelData.hasOutputConnections)) { if (modelData.root && modelData.root.type === "GroupAttribute") { - return Boolean(outputs.parentPins.get(modelData.root.name)) + return Boolean(outputs.parentPins.get(modelData.root.name) || + modelData.hasOutputConnections || modelData.isLinkNested) } return true } @@ -516,7 +518,8 @@ Item { visible: { if (Boolean(modelData.enabled)) { if (modelData.root && modelData.root.type === "GroupAttribute") { - return Boolean(inputs.parentPins.get(modelData.root.name)) + return Boolean(inputs.parentPins.get(modelData.root.name) || + modelData.hasOutputConnections || modelData.isLinkNested) } return true } @@ -603,7 +606,8 @@ Item { visible: { if (Boolean(modelData.enabled || modelData.isLinkNested || modelData.hasOutputConnections)) { if (modelData.root && modelData.root.type === "GroupAttribute") { - return Boolean(inputParams.parentPins.get(modelData.root.name)) + return Boolean(inputParams.parentPins.get(modelData.root.name) || + modelData.hasOutputConnections || modelData.isLinkNested) } return true }