Skip to content

Commit 870dcf4

Browse files
committed
[ui] Edge: Updated curveScale to use standard property binding for EdgeMouseArea
1 parent 49ceb6e commit 870dcf4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

meshroom/ui/qml/GraphEditor/Edge.qml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,13 @@ Item {
138138
anchors.fill: parent
139139
acceptedButtons: Qt.LeftButton | Qt.RightButton
140140
thickness: root.thickness + 4
141+
curveScale: cubic.ctrlPtDist / root.width // Normalize by width
141142
onPressed: function(event) {
142143
root.pressed(event)
143144
}
144145
onReleased: function(event) {
145146
root.released(event)
146147
}
147148

148-
Component.onCompleted: {
149-
/* The curve scale must be set only once the component has been fully created, so
150-
* that all the events following the update of the curve scale can be taken into
151-
* account. */
152-
curveScale = cubic.ctrlPtDist / root.width // Normalize by width
153-
}
154149
}
155150
}

0 commit comments

Comments
 (0)