Skip to content

Commit 431c528

Browse files
committed
[GraphEditor] AttributePin: Disable connections between GroupAttributes
As connections between groups are currently not supported, add connecting any `GroupAttribute` to the list of connections to refuse.
1 parent 3a1ab9b commit 431c528

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

meshroom/ui/qml/GraphEditor/AttributePin.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ RowLayout {
123123
|| drag.source.nodeItem === inputDragTarget.nodeItem // Connection between attributes of the same node
124124
|| (drag.source.isList && childrenRepeater.count) // Source/target are lists but target already has children
125125
|| drag.source.connectorType === "input" // Refuse to connect an "input pin" on another one (input attr can be connected to input attr, but not the graphical pin)
126+
|| (drag.source.isGroup || inputDragTarget.isGroup) // Refuse connection between Groups, which is unsupported
126127
) {
127128
// Refuse attributes connection
128129
drag.accepted = false
@@ -155,6 +156,7 @@ RowLayout {
155156
readonly property bool isOutput: Boolean(attribute.isOutput)
156157
readonly property string baseType: attribute.baseType !== undefined ? attribute.baseType : ""
157158
readonly property alias isList: root.isList
159+
readonly property alias isGroup: root.isGroup
158160
property bool dragAccepted: false
159161
anchors.verticalCenter: parent.verticalCenter
160162
anchors.horizontalCenter: parent.horizontalCenter
@@ -316,6 +318,7 @@ RowLayout {
316318
|| (!drag.source.isList && outputDragTarget.isList) // Connection between a list and a simple attribute
317319
|| (drag.source.isList && childrenRepeater.count) // Source/target are lists but target already has children
318320
|| drag.source.connectorType === "output" // Refuse to connect an output pin on another one
321+
|| (drag.source.isGroup || outputDragTarget.isGroup) // Refuse connection between Groups, which is unsupported
319322
) {
320323
// Refuse attributes connection
321324
drag.accepted = false
@@ -343,6 +346,7 @@ RowLayout {
343346
readonly property alias nodeItem: root.nodeItem
344347
readonly property bool isOutput: Boolean(attribute.isOutput)
345348
readonly property alias isList: root.isList
349+
readonly property alias isGroup: root.isGroup
346350
readonly property string baseType: root.attribute.baseType !== undefined ? attribute.baseType : ""
347351
property bool dropAccepted: false
348352
anchors.horizontalCenter: parent.horizontalCenter

0 commit comments

Comments
 (0)