From: Till Theato Date: Sat, 8 Jan 2011 12:44:45 +0000 (+0000) Subject: Bezier spline editor: Fix inaccurate placement of handles X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=97b543bf3d393cdddf5e4a76580bb1e39081fd0c;p=kdenlive Bezier spline editor: Fix inaccurate placement of handles svn path=/trunk/kdenlive/; revision=5299 --- diff --git a/src/beziercurve/beziersplineeditor.cpp b/src/beziercurve/beziersplineeditor.cpp index eeaae3b0..6316fbfb 100644 --- a/src/beziercurve/beziersplineeditor.cpp +++ b/src/beziercurve/beziersplineeditor.cpp @@ -212,15 +212,12 @@ void BezierSplineEditor::paintEvent(QPaintEvent* event) int max = m_spline.points().count() - 1; p.setPen(QPen(Qt::red, 1, Qt::SolidLine)); BPoint point; - QPolygon handle(4); - handle.setPoints(4, - 1, -2, - 4, 1, - 1, 4, - -2, 1); + + QPolygonF handle = QPolygonF() << QPointF(0, -3) << QPointF(3, 0) << QPointF(0, 3) << QPointF(-3, 0); #if QT_VERSION < 0x040600 - QPolygon tmp; + QPolygonF tmp; #endif + for (int i = 0; i <= max; ++i) { point = m_spline.points().at(i); if (i == m_currentPointIndex) {