From 97b543bf3d393cdddf5e4a76580bb1e39081fd0c Mon Sep 17 00:00:00 2001 From: Till Theato Date: Sat, 8 Jan 2011 12:44:45 +0000 Subject: [PATCH] Bezier spline editor: Fix inaccurate placement of handles svn path=/trunk/kdenlive/; revision=5299 --- src/beziercurve/beziersplineeditor.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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) { -- 2.39.5