Skip to content

Commit bdaf330

Browse files
committed
[GraphEditor] Edge: Correctly update the EdgeMouseArea when moving nodes
1 parent 409c7ec commit bdaf330

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

meshroom/ui/qml/GraphEditor/Edge.qml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,21 @@ Item {
148148
Component.onCompleted: {
149149
/* The curve scale must be set only once the component has been fully created, so
150150
* that all the events following the update of the curve scale can be taken into
151-
* account */
151+
* account. */
152152
curveScale = cubic.ctrlPtDist / root.width // Normalize by width
153153
}
154+
155+
Connections {
156+
target: root
157+
158+
/* When the shape of the edge changes, the curve scale must be updated accordingly
159+
* for the edge to remain selectable. */
160+
function onWidthChanged() {
161+
edgeArea.curveScale = cubic.ctrlPtDist / root.width
162+
}
163+
function onHeightChanged() {
164+
edgeArea.curveScale = cubic.ctrlPtDist / root.width
165+
}
166+
}
154167
}
155168
}

0 commit comments

Comments
 (0)