]> git.sesse.net Git - kdenlive/commitdiff
Rotoscoping: fix points cannot be moved when using spline from saved document
authorTill Theato <root@ttill.de>
Mon, 14 Feb 2011 00:14:01 +0000 (00:14 +0000)
committerTill Theato <root@ttill.de>
Mon, 14 Feb 2011 00:14:01 +0000 (00:14 +0000)
svn path=/trunk/kdenlive/; revision=5402

src/onmonitoritems/rotoscoping/bpointitem.cpp
src/onmonitoritems/rotoscoping/splineitem.cpp

index 0b29097df8af22111aff187d771ef0137ee456ad..3fb03b83c442527fa5945655eb661b8248475c49 100644 (file)
@@ -30,10 +30,6 @@ BPointItem::BPointItem(BPoint point, QGraphicsItem* parent) :
 {
     setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
 
-    QPen framepen(Qt::SolidLine);
-    framepen.setColor(Qt::yellow);
-    setPen(framepen);
-    setBrush(Qt::NoBrush);
     setAcceptHoverEvents(true);
 
     setPos(point.p);
@@ -107,8 +103,7 @@ void BPointItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option
 
 int BPointItem::getSelection(QPointF pos)
 {
-    QPainterPath mouseArea;
-    mouseArea.addRect(pos.x() - 6, pos.y() - 6, 12, 12);
+    QRectF mouseArea(pos.x() - 6, pos.y() - 6, 12, 12);
 
     if (mouseArea.contains(m_point.h1))
         return 0;
index 5dbe00fe9534240828761499becd89419486a38c..ee29f159dfaf571ba435c9ecc82601d6ad8efcad 100644 (file)
@@ -111,6 +111,7 @@ void SplineItem::setPoints(const QList< BPoint >& points)
         grabMouse();
         return;
     } else {
+        ungrabMouse();
         m_closed = true;
     }