The tool Detail now supports Cubic Bezier Path curve.
--HG-- branch : develop
This commit is contained in:
parent
4c1c0d4d0a
commit
ff667c8602
|
@ -2232,10 +2232,21 @@ void VPattern::ParseNodeSplinePath(const QDomElement &domElement, const Document
|
|||
quint32 idTool = 0;
|
||||
|
||||
SplinesCommonAttributes(domElement, id, idObject, idTool);
|
||||
VSplinePath *path = new VSplinePath(*data->GeometricObject<VSplinePath>(idObject));
|
||||
path->setIdObject(idObject);
|
||||
path->setMode(Draw::Modeling);
|
||||
data->UpdateGObject(id, path);
|
||||
const auto obj = data->GetGObject(idObject);
|
||||
if (obj->getType() == GOType::SplinePath)
|
||||
{
|
||||
VSplinePath *path = new VSplinePath(*data->GeometricObject<VSplinePath>(idObject));
|
||||
path->setIdObject(idObject);
|
||||
path->setMode(Draw::Modeling);
|
||||
data->UpdateGObject(id, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
VCubicBezierPath *spl = new VCubicBezierPath(*data->GeometricObject<VCubicBezierPath>(idObject));
|
||||
spl->setIdObject(idObject);
|
||||
spl->setMode(Draw::Modeling);
|
||||
data->UpdateGObject(id, spl);
|
||||
}
|
||||
VNodeSplinePath::Create(this, data, id, idObject, parse, Source::FromFile, idTool);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "../vgeometry/varc.h"
|
||||
#include "../vgeometry/vcubicbezier.h"
|
||||
#include "../vgeometry/vsplinepath.h"
|
||||
#include "../vgeometry/vcubicbezierpath.h"
|
||||
#include "../vwidgets/vmaingraphicsscene.h"
|
||||
#include "../vwidgets/vmaingraphicsview.h"
|
||||
#include "../dialogs/tools/dialogtool.h"
|
||||
|
@ -193,7 +194,15 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstrac
|
|||
break;
|
||||
case (Tool::NodeSplinePath):
|
||||
{
|
||||
id = CreateNode<VSplinePath>(data, nodeD.getId());
|
||||
const auto obj = data->GetGObject(nodeD.getId());
|
||||
if (obj->getType() == GOType::SplinePath)
|
||||
{
|
||||
id = CreateNode<VSplinePath>(data, nodeD.getId());
|
||||
}
|
||||
else
|
||||
{
|
||||
id = CreateNode<VCubicBezierPath>(data, nodeD.getId());
|
||||
}
|
||||
VNodeSplinePath::Create(doc, data, id, nodeD.getId(), Document::FullParse, Source::FromGui);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user