Skip to content

Commit ff4f5d5

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 acdbefc commit ff4f5d5

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
@@ -124,9 +124,10 @@ Item {
124124
* it is reset.
125125
*/
126126
if (Boolean(attribute.enabled)) {
127-
// If the parent's a GroupAttribute, use status of the parent's pin to determine visibility
127+
// If the parent's a GroupAttribute, use status of the parent's pin to determine visibility UNLESS the
128+
// child attribute is already connected
128129
if (attribute.root && attribute.root.type === "GroupAttribute") {
129-
var visible = Boolean(parentPins.get(attribute.root.name))
130+
var visible = Boolean(parentPins.get(attribute.root.name) || attribute.hasOutputConnections || attribute.isLinkNested)
130131
if (!visible && parentPins.has(attribute.name) && parentPins.get(attribute.name) === true) {
131132
parentPins.set(attribute.name, false)
132133
pin.expanded = false
@@ -455,7 +456,8 @@ Item {
455456
visible: {
456457
if (Boolean(modelData.enabled || modelData.hasOutputConnections)) {
457458
if (modelData.root && modelData.root.type === "GroupAttribute") {
458-
return Boolean(outputs.parentPins.get(modelData.root.name))
459+
return Boolean(outputs.parentPins.get(modelData.root.name) ||
460+
modelData.hasOutputConnections || modelData.isLinkNested)
459461
}
460462
return true
461463
}
@@ -516,7 +518,8 @@ Item {
516518
visible: {
517519
if (Boolean(modelData.enabled)) {
518520
if (modelData.root && modelData.root.type === "GroupAttribute") {
519-
return Boolean(inputs.parentPins.get(modelData.root.name))
521+
return Boolean(inputs.parentPins.get(modelData.root.name) ||
522+
modelData.hasOutputConnections || modelData.isLinkNested)
520523
}
521524
return true
522525
}
@@ -603,7 +606,8 @@ Item {
603606
visible: {
604607
if (Boolean(modelData.enabled || modelData.isLinkNested || modelData.hasOutputConnections)) {
605608
if (modelData.root && modelData.root.type === "GroupAttribute") {
606-
return Boolean(inputParams.parentPins.get(modelData.root.name))
609+
return Boolean(inputParams.parentPins.get(modelData.root.name) ||
610+
modelData.hasOutputConnections || modelData.isLinkNested)
607611
}
608612
return true
609613
}

0 commit comments

Comments
 (0)