[GraphEditor] Node: Check if unexposed ListAttributes contain links

If unexposed attributes (ie. attributes that are located in the lower
side of a node, and hidden by default) are connected, they are meant
to remain visible even if the lower part of that node is hidden.

This was working fine for any attribute that was not a `ListAttribute`,
as the check was made on whether the attribute's value was a link to
another attribute. For `ListAttributes`, whose value is actually a list
of values, this was not working as nested links were not checked.

Instead of relying on the `isLink` property, we now use `isLinkNested`:
for regular attributes, this is equivalent to using `isLink`, but for
`ListAttributes`, the full list of values will be checked.
This commit is contained in:
Candice Bentéjac 2024-10-23 17:33:35 +02:00
parent 648b0950b8
commit 248229edcf

View file

@ -495,8 +495,8 @@ Item {
delegate: Loader {
id: paramLoader
active: !object.isOutput && !object.desc.exposed && object.desc.visible
visible: Boolean(object.enabled || object.isLink || object.hasOutputConnections)
property bool isFullyActive: Boolean(m.displayParams || object.isLink || object.hasOutputConnections)
visible: Boolean(object.enabled || object.isLinkNested || object.hasOutputConnections)
property bool isFullyActive: Boolean(m.displayParams || object.isLinkNested || object.hasOutputConnections)
width: parent.width
sourceComponent: AttributePin {