diff --git a/meshroom/ui/components/edge.py b/meshroom/ui/components/edge.py index 4108fc6a2c..da6f051ea1 100755 --- a/meshroom/ui/components/edge.py +++ b/meshroom/ui/components/edge.py @@ -17,7 +17,7 @@ def __init__(self, evt): x = Property(float, lambda self: self._x, constant=True) y = Property(float, lambda self: self._y, constant=True) button = Property(Qt.MouseButton, lambda self: self._button, constant=True) - modifiers = Property(int, lambda self: self._modifiers, constant=True) + modifiers = Property(Qt.KeyboardModifier, lambda self: self._modifiers, constant=True) class EdgeMouseArea(QQuickItem): @@ -47,8 +47,8 @@ def hoverLeaveEvent(self, evt): self.setContainsMouse(False) super(EdgeMouseArea, self).hoverLeaveEvent(evt) - def geometryChanged(self, newGeometry, oldGeometry): - super(EdgeMouseArea, self).geometryChanged(newGeometry, oldGeometry) + def geometryChange(self, newGeometry, oldGeometry): + super(EdgeMouseArea, self).geometryChange(newGeometry, oldGeometry) self.updateShape() def mousePressEvent(self, evt): diff --git a/meshroom/ui/qml/GraphEditor/Edge.qml b/meshroom/ui/qml/GraphEditor/Edge.qml index ba90a688a8..e6832edeec 100644 --- a/meshroom/ui/qml/GraphEditor/Edge.qml +++ b/meshroom/ui/qml/GraphEditor/Edge.qml @@ -138,6 +138,7 @@ Item { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton thickness: root.thickness + 4 + curveScale: cubic.ctrlPtDist / root.width // Normalize by width onPressed: function(event) { root.pressed(event) } @@ -145,11 +146,5 @@ Item { root.released(event) } - Component.onCompleted: { - /* The curve scale must be set only once the component has been fully created, so - * that all the events following the update of the curve scale can be taken into - * account. */ - curveScale = Qt.binding(() => cubic.ctrlPtDist / root.width) // Normalize by width - } } }