The callbacks of `childrenRepeater` (which was used to "fill"
`ListAttributes` with children) were not correctly set. Their prototypes
were missing the `index` argument, meaning that instead of being
provided with the child attribute that was added or deleted,
they were provided with its index in the model.
The added children attributes were also instatiated as empty attribute
pins that were still visible, thus increasing indirectly the spacing of
the initial pin.
This fixes the following QML warnings that may appear when performing
lots of operations on edges:
`Unable to assign [undefined] to QString/bool`
These warnings do not seem to have any functional impact on the connection
processes.
If attribute is disabled but has output connections, it becomes grey.
If the connection is removed while being disabled, it hides itself.
Both is working in GraphEditor on the nodes and in the AttributeEditor.
This commit effectively hides a node's attributes when they are disabled.
If these attributes have connections, the edges representing these
connections are hidden but not destroyed. When the edges are hidden, if
one of the connected attributes is still enabled, its pin becomes empty as
if it was not connected to anything.
If the disabled attribute is re-enabled and the connection has not been
broken (if the enabled attribute on the other side of the edge has not
been reconnected to another attribute, for example), the edge re-appears.
If the connection has been broken, then the attribute will be unconnected.
Hidden connections are saved in project files and taken into account when
a project file containing some is loaded.
This commit addresses warnings that were raised by QtCreator's linter:
- IDs declared more than once
- variables declared more than once in the same scope
- type coercions
- variables declared as "var" when their type is known
- unclosed "case" in switch-case
Moving the mouse rapidly when starting to connect two nodes'
attributes could lead to an unwanted offset between the tip of
the edge and the mouse's position; it forced the user to move
the mouse further than the attribute pin they wanted to connect
to in order to actually be able to connect to it.
* make Drag/DropArea overflow on the attribute's label to be more tolerant when connecting attributes
* add visual feedback when hovering interactive areas
* tweak spacings between attributes
* fix ListAttribute => ListAttribute with children (was breaking multiple simple connections to a ListAttribute)
* add missing case ListAttribute => Attribute
* bugfix: in latest PySide2 versions, application palette is not properly applied to all QtQuick Controls 2 components. Force this by exposing QApplication palette and bind it to the root ApplicationWindow.
* rename all "palette" ids to "activePalette" to avoid clashes with "palette" property on QtQuick Controls 2
* use parent component palette when it makes sense to propagate active/disabled style (instead of always using Active SystemPalette)