diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index 4143cb82b..eee96a778 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -699,3 +699,15 @@ quint32 VAbstractTool::CreateNodeSplinePath(VContainer *data, quint32 id) return VAbstractTool::CreateNode(data, id); } } + +//--------------------------------------------------------------------------------------------------------------------- +quint32 VAbstractTool::CreateNodePoint(VContainer *data, quint32 id, const QSharedPointer &point) +{ + const quint32 pointId = CreateNode(data, id); + QSharedPointer p = data->GeometricObject(pointId); + p->SetShowLabel(point->IsShowLabel()); + p->setMx(point->mx()); + p->setMy(point->my()); + data->UpdateGObject(pointId, point); + return pointId; +} diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index 58a71b098..541175384 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -165,6 +165,7 @@ protected: static quint32 CreateNode(VContainer *data, quint32 id); static quint32 CreateNodeSpline(VContainer *data, quint32 id); static quint32 CreateNodeSplinePath(VContainer *data, quint32 id); + static quint32 CreateNodePoint(VContainer *data, quint32 id, const QSharedPointer &point); template void AddVisualization(); diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index 6b511dac8..d03a7a3b1 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -1914,9 +1914,12 @@ quint32 VToolSeamAllowance::DuplicateNode(const VPieceNode &node, const VToolSea switch (node.GetTypeTool()) { case (Tool::NodePoint): - initNodeData.id = VAbstractTool::CreateNode(initData.data, gobj->getIdObject()); + { + const QSharedPointer point = qSharedPointerDynamicCast(gobj); + initNodeData.id = VAbstractTool::CreateNodePoint(initData.data, gobj->getIdObject(), point); VNodePoint::Create(initNodeData); break; + } case (Tool::NodeArc): initNodeData.id = VAbstractTool::CreateNode(initData.data, gobj->getIdObject()); VNodeArc::Create(initNodeData);