[ui] GraphEditor: output attributes are never read-only

Also allow to expand attributes list on a locked node.
This commit is contained in:
Fabien Castan 2020-12-28 19:01:36 +01:00
parent 2b48188b32
commit 8ef793a488
2 changed files with 4 additions and 4 deletions

View file

@ -155,7 +155,7 @@ RowLayout {
point1y: inputDragTarget.y + inputDragTarget.height/2
point2x: parent.width / 2
point2y: parent.width / 2
color: nameLabel.color
color: palette.highlight
thickness: outputDragTarget.dropAccepted ? 2 : 1
}
}
@ -171,6 +171,7 @@ RowLayout {
Label {
id: nameLabel
enabled: !root.readOnly
property bool hovered: (inputConnectMA.containsMouse || inputConnectMA.drag.active || inputDropArea.containsDrag || outputConnectMA.containsMouse || outputConnectMA.drag.active || outputDropArea.containsDrag)
text: attribute ? attribute.label : ""
elide: hovered ? Text.ElideNone : Text.ElideMiddle
@ -289,7 +290,7 @@ RowLayout {
point1y: parent.width / 2
point2x: outputDragTarget.x + outputDragTarget.width/2
point2y: outputDragTarget.y + outputDragTarget.height/2
color: nameLabel.color
color: palette.highlight
thickness: outputDragTarget.dropAccepted ? 2 : 1
}
}

View file

@ -270,7 +270,7 @@ Item {
height: childrenRect.height
anchors.horizontalCenter: parent.horizontalCenter
enabled: !root.readOnly && !root.isCompatibilityNode
enabled: !root.isCompatibilityNode
Column {
id: attributesColumn
@ -299,7 +299,6 @@ Item {
property real globalX: root.x + nodeAttributes.x + outputs.x + outputLoader.x + outPin.x
property real globalY: root.y + nodeAttributes.y + outputs.y + outputLoader.y + outPin.y
readOnly: root.readOnly
onPressed: root.pressed(mouse)
Component.onCompleted: attributePinCreated(object, outPin)
Component.onDestruction: attributePinDeleted(attribute, outPin)