[ui] GraphEditor: fix binding warnings

This commit is contained in:
Julien-Haudegond 2020-08-24 15:34:51 +02:00
parent 79e1c69d5d
commit ae7daf0365
2 changed files with 6 additions and 6 deletions

View file

@ -58,7 +58,7 @@ RowLayout {
color: Colors.sysPalette.base
Rectangle {
visible: inputConnectMA.containsMouse || childrenRepeater.count > 0 || attribute.isLink
visible: inputConnectMA.containsMouse || childrenRepeater.count > 0 || (attribute && attribute.isLink)
radius: isList ? 0 : 2
anchors.fill: parent
anchors.margins: 2
@ -169,7 +169,7 @@ RowLayout {
id: nameLabel
property bool hovered: (inputConnectMA.containsMouse || inputConnectMA.drag.active || inputDropArea.containsDrag || outputConnectMA.containsMouse || outputConnectMA.drag.active || outputDropArea.containsDrag)
text: attribute.label
text: attribute ? attribute.label : ""
elide: hovered ? Text.ElideNone : Text.ElideMiddle
width: hovered ? contentWidth : parent.width
font.pointSize: 7

View file

@ -162,7 +162,7 @@ Item {
// Node Name
Label {
Layout.fillWidth: true
text: node.label
text: node ? node.label : ""
padding: 4
color: root.selected ? "white" : activePalette.text
elide: Text.ElideMiddle
@ -218,7 +218,7 @@ Item {
defaultColor: Colors.sysPalette.mid
implicitHeight: 3
width: parent.width
model: node.chunks
model: node ? node.chunks : undefined
Rectangle {
anchors.fill: parent
@ -249,7 +249,7 @@ Item {
width: parent.width
spacing: 3
Repeater {
model: node.attributes
model: node ? node.attributes : undefined
delegate: Loader {
id: outputLoader
@ -276,7 +276,7 @@ Item {
width: parent.width
spacing: 3
Repeater {
model: node.attributes
model: node ? node.attributes : undefined
delegate: Loader {
active: !object.isOutput && isDisplayableAsPin(object)
width: inputs.width