NodeEditor: Add the default name of the node next to the label

If a node has a user-set label (defined through the internal attributes
of the node), its default name (the one that is displayed if no label
has been set) will be displayed next to it.

This allows to find quickly the correspondence between the node's label
and its type / how it is referred to in the current graph's file.
This commit is contained in:
Candice Bentéjac 2023-07-20 16:28:33 +02:00
parent 24b60b3d42
commit 49c11a9b9a
2 changed files with 6 additions and 2 deletions

View file

@ -21,7 +21,7 @@ Panel {
signal attributeDoubleClicked(var mouse, var attribute)
signal upgradeRequest()
title: "Node" + (node !== null ? " - <b>" + node.label + "</b>" : "")
title: "Node" + (node !== null ? " - <b>" + node.label + "</b>" + (node.label !== node.defaultLabel ? " (" + node.defaultLabel + ")" : "") : "")
icon: MaterialLabel { text: MaterialIcons.tune }
headerBar: RowLayout {