[GraphEditor] Stop manually editing pins based on the edge's visibility

Editing the pins manually was useful when trying to hide fully the
connection whenever there was an edge connected to an attribute that
was disabled. Disabled attributes now have a special display if they are
connected, meaning both ends of the edge do not need artificial updates.
This commit is contained in:
Candice Bentéjac 2024-10-04 18:08:16 +02:00
parent b02a0eef88
commit 12249de216

View file

@ -521,22 +521,6 @@ Item {
}
}
}
onVisibleChanged: {
if (visible) {
// Enable the pins on both sides
src.updatePin(true, true) // isSrc = true, isVisible = true
dst.updatePin(false, true) // isSrc = false, isVisible = true
} else {
// One of the attributes is visible, we do not need to handle the case where both attributes are hidden
if (isValidEdge && (src.visible || dst.visible)) {
if (src.visible) {
src.updatePin(true, false) // isSrc = true, isVisible = false
} else {
dst.updatePin(false, false) // isSrc = false, isVisible = false
}
}
}
}
Component.onDestruction: {
// Handles the case where the edge is destroyed while hidden because it is replaced: the pins should be re-enabled