Skip to content

Commit 449cc90

Browse files
committed
[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).
1 parent 1641773 commit 449cc90

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

meshroom/ui/qml/GraphEditor/Node.qml

+9-5
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ Item {
126126
* it is reset.
127127
*/
128128
if (Boolean(attribute.enabled)) {
129-
// If the parent's a GroupAttribute, use status of the parent's pin to determine visibility
129+
// If the parent's a GroupAttribute, use status of the parent's pin to determine visibility UNLESS the
130+
// child attribute is already connected
130131
if (attribute.root && attribute.root.type === "GroupAttribute") {
131-
var visible = Boolean(parentPins.get(attribute.root.name))
132+
var visible = Boolean(parentPins.get(attribute.root.name) || attribute.hasOutputConnections || attribute.isLinkNested)
132133
if (!visible && parentPins.has(attribute.name) && parentPins.get(attribute.name) === true) {
133134
parentPins.set(attribute.name, false)
134135
pin.expanded = false
@@ -459,7 +460,8 @@ Item {
459460
visible: {
460461
if (Boolean(modelData.enabled || modelData.hasOutputConnections)) {
461462
if (modelData.root && modelData.root.type === "GroupAttribute") {
462-
return Boolean(outputs.parentPins.get(modelData.root.name))
463+
return Boolean(outputs.parentPins.get(modelData.root.name) ||
464+
modelData.hasOutputConnections || modelData.isLinkNested)
463465
}
464466
return true
465467
}
@@ -520,7 +522,8 @@ Item {
520522
visible: {
521523
if (Boolean(modelData.enabled)) {
522524
if (modelData.root && modelData.root.type === "GroupAttribute") {
523-
return Boolean(inputs.parentPins.get(modelData.root.name))
525+
return Boolean(inputs.parentPins.get(modelData.root.name) ||
526+
modelData.hasOutputConnections || modelData.isLinkNested)
524527
}
525528
return true
526529
}
@@ -607,7 +610,8 @@ Item {
607610
visible: {
608611
if (Boolean(modelData.enabled || modelData.isLinkNested || modelData.hasOutputConnections)) {
609612
if (modelData.root && modelData.root.type === "GroupAttribute") {
610-
return Boolean(inputParams.parentPins.get(modelData.root.name))
613+
return Boolean(inputParams.parentPins.get(modelData.root.name) ||
614+
modelData.hasOutputConnections || modelData.isLinkNested)
611615
}
612616
return true
613617
}

0 commit comments

Comments
 (0)