[ui]Do not allow to start a new connection on an already connected input

This commit is contained in:
Lee Geertsen 2019-09-11 16:28:06 +02:00 committed by Yann Lanthony
parent 502e912f77
commit 9f5775cc6b
No known key found for this signature in database
GPG key ID: 519FAE6DF7A70642

View file

@ -124,7 +124,8 @@ RowLayout {
MouseArea { MouseArea {
id: inputConnectMA id: inputConnectMA
drag.target: inputDragTarget // If an input attribute is connected (isLink), we disable drag&drop
drag.target: attribute.isLink ? undefined : inputDragTarget
drag.threshold: 0 drag.threshold: 0
enabled: !root.readOnly enabled: !root.readOnly
anchors.fill: parent anchors.fill: parent
@ -277,7 +278,7 @@ RowLayout {
} }
} }
state: inputConnectMA.pressed ? "DraggingInput" : outputConnectMA.pressed ? "DraggingOutput" : "" state: (inputConnectMA.pressed && !attribute.isLink) ? "DraggingInput" : outputConnectMA.pressed ? "DraggingOutput" : ""
states: [ states: [
State { State {