From: Till Theato Date: Sat, 1 Jan 2011 12:38:06 +0000 (+0000) Subject: Bézier spline widget: When moving a point also move its handles X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=858d442f23c890f2973067d9b49a33da6e674de2;p=kdenlive Bézier spline widget: When moving a point also move its handles svn path=/trunk/kdenlive/; revision=5231 --- diff --git a/src/beziercurve/beziersplinewidget.cpp b/src/beziercurve/beziersplinewidget.cpp index 8f6eff0d..efc9b000 100644 --- a/src/beziercurve/beziersplinewidget.cpp +++ b/src/beziercurve/beziersplinewidget.cpp @@ -179,7 +179,7 @@ void BezierSplineWidget::mousePressEvent(QMouseEvent* event) point.h2 = QPointF(x + m_grabOffsetX, y + m_grabOffsetY); } m_spline.setPoint(m_currentPointIndex, point); - + //d->m_draggedAwayPointIndex = -1; m_mode = ModeDrag; @@ -266,6 +266,11 @@ void BezierSplineWidget::mouseMoveEvent(QMouseEvent* event) } x = qBound(leftX, x, rightX); y = qBound(0., y, 1.); + + // move handles by same offset + point.h1 += QPointF(x, y) - point.p; + point.h2 += QPointF(x, y) - point.p; + point.p = QPointF(x, y); break; case PTypeH2: