Skip to content

Commit

Permalink
[GraphEditor] Stop manually editing pins based on the edge's visibility
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbentejac committed Oct 4, 2024
1 parent e5189fb commit dcece1d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcece1d

Please sign in to comment.