Copy piece tool should copy more point information: label position and
show/hide state. --HG-- branch : develop
This commit is contained in:
parent
762f88579a
commit
525a8b0dc2
|
@ -699,3 +699,15 @@ quint32 VAbstractTool::CreateNodeSplinePath(VContainer *data, quint32 id)
|
||||||
return VAbstractTool::CreateNode<VCubicBezierPath>(data, id);
|
return VAbstractTool::CreateNode<VCubicBezierPath>(data, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
quint32 VAbstractTool::CreateNodePoint(VContainer *data, quint32 id, const QSharedPointer<VPointF> &point)
|
||||||
|
{
|
||||||
|
const quint32 pointId = CreateNode<VPointF>(data, id);
|
||||||
|
QSharedPointer<VPointF> p = data->GeometricObject<VPointF>(pointId);
|
||||||
|
p->SetShowLabel(point->IsShowLabel());
|
||||||
|
p->setMx(point->mx());
|
||||||
|
p->setMy(point->my());
|
||||||
|
data->UpdateGObject(pointId, point);
|
||||||
|
return pointId;
|
||||||
|
}
|
||||||
|
|
|
@ -165,6 +165,7 @@ protected:
|
||||||
static quint32 CreateNode(VContainer *data, quint32 id);
|
static quint32 CreateNode(VContainer *data, quint32 id);
|
||||||
static quint32 CreateNodeSpline(VContainer *data, quint32 id);
|
static quint32 CreateNodeSpline(VContainer *data, quint32 id);
|
||||||
static quint32 CreateNodeSplinePath(VContainer *data, quint32 id);
|
static quint32 CreateNodeSplinePath(VContainer *data, quint32 id);
|
||||||
|
static quint32 CreateNodePoint(VContainer *data, quint32 id, const QSharedPointer<VPointF> &point);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void AddVisualization();
|
void AddVisualization();
|
||||||
|
|
|
@ -1914,9 +1914,12 @@ quint32 VToolSeamAllowance::DuplicateNode(const VPieceNode &node, const VToolSea
|
||||||
switch (node.GetTypeTool())
|
switch (node.GetTypeTool())
|
||||||
{
|
{
|
||||||
case (Tool::NodePoint):
|
case (Tool::NodePoint):
|
||||||
initNodeData.id = VAbstractTool::CreateNode<VPointF>(initData.data, gobj->getIdObject());
|
{
|
||||||
|
const QSharedPointer<VPointF> point = qSharedPointerDynamicCast<VPointF>(gobj);
|
||||||
|
initNodeData.id = VAbstractTool::CreateNodePoint(initData.data, gobj->getIdObject(), point);
|
||||||
VNodePoint::Create(initNodeData);
|
VNodePoint::Create(initNodeData);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case (Tool::NodeArc):
|
case (Tool::NodeArc):
|
||||||
initNodeData.id = VAbstractTool::CreateNode<VArc>(initData.data, gobj->getIdObject());
|
initNodeData.id = VAbstractTool::CreateNode<VArc>(initData.data, gobj->getIdObject());
|
||||||
VNodeArc::Create(initNodeData);
|
VNodeArc::Create(initNodeData);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user