Always show a curve control points on top.

--HG--
branch : develop
This commit is contained in:
dismine 2014-09-27 15:50:00 +03:00
parent b13ce61d9a
commit 9d35b4fa5a
3 changed files with 3 additions and 4 deletions

View File

@ -214,10 +214,9 @@ void VToolSpline::ShowVisualization(bool show)
{
if (vis == nullptr)
{
VisToolSpline *visual = new VisToolSpline(getData());
VisToolSpline *visual = new VisToolSpline(getData(), this);
VMainGraphicsScene *scene = qApp->getCurrentScene();
connect(scene, &VMainGraphicsScene::NewFactor, visual, &Visualization::SetFactor);
scene->addItem(visual);
const QSharedPointer<VSpline> spl = VAbstractTool::data.GeometricObject<VSpline>(id);
visual->setPoint1Id(spl->GetP1().id());

View File

@ -291,10 +291,9 @@ void VToolSplinePath::ShowVisualization(bool show)
{
if (vis == nullptr)
{
VisToolSplinePath *visual = new VisToolSplinePath(getData());
VisToolSplinePath *visual = new VisToolSplinePath(getData(), this);
VMainGraphicsScene *scene = qApp->getCurrentScene();
connect(scene, &VMainGraphicsScene::NewFactor, visual, &Visualization::SetFactor);
scene->addItem(visual);
QSharedPointer<VSplinePath> splPath = VAbstractTool::data.GeometricObject<VSplinePath>(id);
visual->setPath(*splPath.data());

View File

@ -60,6 +60,7 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePointP
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
this->setAcceptHoverEvents(true);
this->setPos(controlPoint);
this->setZValue(100);
QPointF p1, p2;
VAbstractTool::LineIntersectCircle(QPointF(), radius, QLineF( QPointF(), splinePoint-controlPoint), p1, p2);