diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index e157340fe..5521027c4 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -264,6 +264,22 @@ void VToolSplinePath::UpdatePathPoint(VPattern *doc, QDomNode& node, const VSpli } } +//--------------------------------------------------------------------------------------------------------------------- +VSplinePath VToolSplinePath::getSplinePath() const +{ + QSharedPointer splPath = VAbstractTool::data.GeometricObject(id); + return *splPath.data(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VToolSplinePath::setSplinePath(const VSplinePath &splPath) +{ + QSharedPointer obj = VAbstractTool::data.GetGObject(id); + QSharedPointer splinePath = qSharedPointerDynamicCast(obj); + *splinePath.data() = splPath; + SaveOption(obj); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief contextMenuEvent handle context menu events. diff --git a/src/app/tools/drawTools/vtoolsplinepath.h b/src/app/tools/drawTools/vtoolsplinepath.h index e854c6d4f..cd8046a89 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.h +++ b/src/app/tools/drawTools/vtoolsplinepath.h @@ -48,6 +48,9 @@ public: static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::SplinePath)}; + + VSplinePath getSplinePath()const; + void setSplinePath(const VSplinePath &splPath); signals: /** * @brief RefreshLine refresh control line.