From 773383ec707a9dc818383a23fe0d7da56b4edc0e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 26 Feb 2016 19:19:30 +0200 Subject: [PATCH] Fixed moving a spline by dragging. --HG-- branch : feature --- src/libs/vtools/undocommands/movespline.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libs/vtools/undocommands/movespline.cpp b/src/libs/vtools/undocommands/movespline.cpp index f19650e0e..6aa9568ce 100644 --- a/src/libs/vtools/undocommands/movespline.cpp +++ b/src/libs/vtools/undocommands/movespline.cpp @@ -92,11 +92,13 @@ void MoveSpline::Do(const VSpline &spl) QDomElement domElement = doc->elementById(nodeId); if (domElement.isElement()) { - doc->SetAttribute(domElement, AttrAngle1, QString().setNum(spl.GetStartAngle())); - doc->SetAttribute(domElement, AttrAngle2, QString().setNum(spl.GetEndAngle())); - doc->SetAttribute(domElement, AttrKAsm1, QString().setNum(spl.GetKasm1())); - doc->SetAttribute(domElement, AttrKAsm2, QString().setNum(spl.GetKasm2())); - doc->SetAttribute(domElement, AttrKCurve, QString().setNum(spl.GetKcurve())); + doc->SetAttribute(domElement, AttrPoint1, spl.GetP1().id()); + doc->SetAttribute(domElement, AttrPoint4, spl.GetP4().id()); + doc->SetAttribute(domElement, AttrAngle1, spl.GetStartAngleFormula()); + doc->SetAttribute(domElement, AttrAngle2, spl.GetEndAngleFormula()); + doc->SetAttribute(domElement, AttrLength1, spl.GetC1LengthFormula()); + doc->SetAttribute(domElement, AttrLength2, spl.GetC2LengthFormula()); + doc->SetAttribute(domElement, AttrKCurve, spl.GetKcurve()); emit NeedLiteParsing(Document::LiteParse); }