diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/app/tools/drawTools/vtoolspline.cpp index 8235bc7be..788a383ce 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/app/tools/drawTools/vtoolspline.cpp @@ -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 spl = VAbstractTool::data.GeometricObject(id); visual->setPoint1Id(spl->GetP1().id()); diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index 6184a8710..3a53d0193 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -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 splPath = VAbstractTool::data.GeometricObject(id); visual->setPath(*splPath.data()); diff --git a/src/app/visualization/vcontrolpointspline.cpp b/src/app/visualization/vcontrolpointspline.cpp index fce8b63c1..84aa95953 100644 --- a/src/app/visualization/vcontrolpointspline.cpp +++ b/src/app/visualization/vcontrolpointspline.cpp @@ -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);