Fix black square bug.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-10-29 20:12:35 +02:00
parent 1ce645fa16
commit 61efe97e6c

View File

@ -266,6 +266,7 @@ void VControlPointSpline::Init()
controlLine = new VScaledLine(this); controlLine = new VScaledLine(this);
controlLine->SetBasicWidth(widthHairLine); controlLine->SetBasicWidth(widthHairLine);
controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
controlLine->setVisible(false);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -274,7 +275,9 @@ void VControlPointSpline::SetCtrlLine(const QPointF &controlPoint, const QPointF
QPointF p1, p2; QPointF p1, p2;
VGObject::LineIntersectCircle(QPointF(), ScaledRadius(SceneScale(scene())), VGObject::LineIntersectCircle(QPointF(), ScaledRadius(SceneScale(scene())),
QLineF( QPointF(), splinePoint-controlPoint), p1, p2); QLineF( QPointF(), splinePoint-controlPoint), p1, p2);
controlLine->setLine(QLineF(splinePoint-controlPoint, p1)); QLineF line(splinePoint-controlPoint, p1);
controlLine->setLine(line);
controlLine->setVisible(not line.isNull());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------