diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index 9751a2dc5..b68296a1b 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -132,9 +132,9 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(const quint32 _id, quint32 orig quint32 id = _id; CreateDestination(typeCreation, id, dest, source, fPoint, sPoint, suffix, doc, data, parse); - VDrawTool::AddRecord(id, Tool::FlippingByAxis, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::FlippingByAxis, doc); VToolFlippingByAxis *tool = new VToolFlippingByAxis(doc, data, id, originPointId, axisType, suffix, source, dest, typeCreation); scene->addItem(tool); diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index af27d8410..55d1a7a25 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -126,9 +126,9 @@ VToolFlippingByLine *VToolFlippingByLine::Create(const quint32 _id, quint32 firs quint32 id = _id; CreateDestination(typeCreation, id, dest, source, fPoint, sPoint, suffix, doc, data, parse); - VDrawTool::AddRecord(id, Tool::FlippingByLine, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::FlippingByLine, doc); VToolFlippingByLine *tool = new VToolFlippingByLine(doc, data, id, firstLinePointId, secondLinePointId, suffix, source, dest, typeCreation); scene->addItem(tool); diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index 0e6617b06..e6cb24cb7 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -227,9 +227,9 @@ QT_WARNING_POP } } - VDrawTool::AddRecord(id, Tool::Move, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Move, doc); VToolMove *tool = new VToolMove(doc, data, id, formulaAngle, formulaLength, suffix, source, dest, typeCreation); scene->addItem(tool); diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 20d31eb22..17ad34e4e 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -238,9 +238,9 @@ QT_WARNING_POP } } - VDrawTool::AddRecord(id, Tool::Rotation, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Rotation, doc); VToolRotation *tool = new VToolRotation(doc, data, id, origin, angle, suffix, source, dest, typeCreation); scene->addItem(tool); InitOperationToolConnections(scene, tool); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp index 25d7dfdd9..8f7d7274e 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp @@ -170,9 +170,10 @@ VToolArc* VToolArc::Create(const quint32 _id, const quint32 ¢er, QString &ra doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Arc, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Arc, doc); VToolArc *toolArc = new VToolArc(doc, data, id, typeCreation); scene->addItem(toolArc); InitArcToolConnections(scene, toolArc); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp index dd76cad3b..0e63d348e 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp @@ -140,9 +140,10 @@ VToolArcWithLength *VToolArcWithLength::Create(const quint32 _id, const quint32 doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::ArcWithLength, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::ArcWithLength, doc); VToolArcWithLength *toolArc = new VToolArcWithLength(doc, data, id, typeCreation); scene->addItem(toolArc); InitArcToolConnections(scene, toolArc); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp index b178efc2f..dc8532c71 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp @@ -128,9 +128,10 @@ VToolCubicBezier *VToolCubicBezier::Create(const quint32 _id, VCubicBezier *spli doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::CubicBezier, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CubicBezier, doc); auto _spl = new VToolCubicBezier(doc, data, id, typeCreation); scene->addItem(_spl); InitSplineToolConnections(scene, _spl); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp index a144235f9..1996d55a7 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp @@ -133,9 +133,10 @@ VToolCubicBezierPath *VToolCubicBezierPath::Create(const quint32 _id, VCubicBezi doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::CubicBezierPath, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CubicBezierPath, doc); VToolCubicBezierPath *spl = new VToolCubicBezierPath(doc, data, id, typeCreation); scene->addItem(spl); InitSplinePathToolConnections(scene, spl); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp index 20ca1b786..74fd655ec 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp @@ -184,9 +184,10 @@ VToolEllipticalArc* VToolEllipticalArc::Create(const quint32 _id, const quint32 doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::EllipticalArc, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::EllipticalArc, doc); VToolEllipticalArc *toolEllipticalArc = new VToolEllipticalArc(doc, data, id, typeCreation); scene->addItem(toolEllipticalArc); InitElArcToolConnections(scene, toolEllipticalArc); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp index 975986592..32e0db0f0 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp @@ -207,9 +207,10 @@ VToolSpline* VToolSpline::Create(const quint32 _id, VSpline *spline, const QStri doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Spline, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Spline, doc); auto _spl = new VToolSpline(doc, data, id, typeCreation); scene->addItem(_spl); InitSplineToolConnections(scene, _spl); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index d6110f6b3..bb7bb170f 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -218,9 +218,10 @@ VToolSplinePath* VToolSplinePath::Create(const quint32 _id, VSplinePath *path, c doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::SplinePath, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::SplinePath, doc); VToolSplinePath *spl = new VToolSplinePath(doc, data, id, typeCreation); scene->addItem(spl); InitSplinePathToolConnections(scene, spl); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp index 24f2521d0..d53c8376a 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp @@ -189,9 +189,10 @@ VToolTrueDarts *VToolTrueDarts::Create(quint32 _id, doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::TrueDarts, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::TrueDarts, doc); VToolTrueDarts *points = new VToolTrueDarts(doc, data, id, p1id, p2id, baseLineP1Id, baseLineP2Id, dartP1Id, dartP2Id, dartP3Id, typeCreation); scene->addItem(points); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp index 4c9392d43..7358e3f69 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -170,9 +170,9 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS } } - VDrawTool::AddRecord(id, Tool::CutArc, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CutArc, doc); VToolCutArc *point = new VToolCutArc(doc, data, id, formula, arcId, typeCreation); scene->addItem(point); InitToolConnections(scene, point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp index 433f29bea..7bd86b195 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -170,9 +170,10 @@ VToolCutSpline* VToolCutSpline::Create(const quint32 _id, const QString &pointNa doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::CutSpline, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CutSpline, doc); VToolCutSpline *point = new VToolCutSpline(doc, data, id, formula, splineId, typeCreation); scene->addItem(point); InitToolConnections(scene, point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index a9256571f..e7f9b1acb 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -182,9 +182,9 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString } } - VDrawTool::AddRecord(id, Tool::CutSplinePath, doc); if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CutSplinePath, doc); VToolCutSplinePath *point = new VToolCutSplinePath(doc, data, id, formula, splinePathId, typeCreation); scene->addItem(point); InitToolConnections(scene, point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp index 958a80fa1..8744c2043 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp @@ -299,10 +299,11 @@ VToolAlongLine* VToolAlongLine::Create(const quint32 _id, const QString &pointNa doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::AlongLine, doc); + VToolAlongLine *point = nullptr; if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::AlongLine, doc); point = new VToolAlongLine(doc, data, id, formula, firstPointId, secondPointId, typeLine, lineColor, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp index ff670bb90..a75bc8a9f 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -217,9 +217,10 @@ VToolBisector* VToolBisector::Create(const quint32 _id, QString &formula, const doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Bisector, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Bisector, doc); VToolBisector *point = new VToolBisector(doc, data, id, typeLine, lineColor, formula, firstPointId, secondPointId, thirdPointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index 478033be4..3497876db 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -167,9 +167,10 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(const quint32 _id, cons doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::CurveIntersectAxis, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::CurveIntersectAxis, doc); VToolCurveIntersectAxis *point = new VToolCurveIntersectAxis(doc, data, id, typeLine, lineColor, formulaAngle, basePointId, curveId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp index 828b5c12c..c88e48d50 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -181,9 +181,10 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName, doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::EndLine, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::EndLine, doc); VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, lineColor, formulaLength, formulaAngle, basePointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp index 83a79bef4..0ad049fa0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp @@ -174,9 +174,10 @@ VToolHeight* VToolHeight::Create(const quint32 _id, const QString &pointName, co doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Height, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Height, doc); VToolHeight *point = new VToolHeight(doc, data, id, typeLine, lineColor, basePointId, p1LineId, p2LineId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 6a145ed1f..c9c636bd9 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -154,9 +154,10 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(const quint32 _id, const doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::LineIntersectAxis, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::LineIntersectAxis, doc); VToolLineIntersectAxis *point = new VToolLineIntersectAxis(doc, data, id, typeLine, lineColor, formulaAngle, basePointId, firstPointId, secondPointId, typeCreation); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp index f9fb7335b..e543e39a4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -177,9 +177,10 @@ VToolNormal* VToolNormal::Create(const quint32 _id, QString &formula, const quin doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Normal, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Normal, doc); VToolNormal *point = new VToolNormal(doc, data, id, typeLine, lineColor, formula, angle, firstPointId, secondPointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp index ae5b1b6ea..a2606aedb 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -222,9 +222,10 @@ VToolShoulderPoint* VToolShoulderPoint::Create(const quint32 _id, QString &formu doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::ShoulderPoint, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::ShoulderPoint, doc); VToolShoulderPoint *point = new VToolShoulderPoint(doc, data, id, typeLine, lineColor, formula, p1Line, p2Line, pShoulder, typeCreation); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp index 04cd385ca..952e330d5 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp @@ -136,9 +136,10 @@ VToolBasePoint *VToolBasePoint::Create(quint32 _id, const QString &nameActivPP, doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::BasePoint, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::BasePoint, doc); VToolBasePoint *spoint = new VToolBasePoint(doc, data, id, typeCreation, nameActivPP); scene->addItem(spoint); InitToolConnections(scene, spoint); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp index 54f54d459..dad12e820 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp @@ -182,9 +182,10 @@ VToolLineIntersect* VToolLineIntersect::Create(const quint32 _id, const quint32 doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::LineIntersect, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::LineIntersect, doc); VToolLineIntersect *point = new VToolLineIntersect(doc, data, id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp index 73abb59e1..36a4181d4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp @@ -125,9 +125,10 @@ VToolPointFromArcAndTangent *VToolPointFromArcAndTangent::Create(const quint32 _ doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointFromArcAndTangent, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointFromArcAndTangent, doc); VToolPointFromArcAndTangent *point = new VToolPointFromArcAndTangent(doc, data, id, arcId, tangentPointId, crossPoint, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp index 828ae6053..96ba98fcb 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp @@ -134,9 +134,10 @@ VToolPointFromCircleAndTangent *VToolPointFromCircleAndTangent::Create(const qui doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointFromCircleAndTangent, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointFromCircleAndTangent, doc); VToolPointFromCircleAndTangent *point = new VToolPointFromCircleAndTangent(doc, data, id, circleCenterId, circleRadius, tangentPointId, crossPoint, typeCreation); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp index cd010e3d9..8fd3a715e 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -239,9 +239,10 @@ VToolPointOfContact* VToolPointOfContact::Create(const quint32 _id, QString &rad doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointOfContact, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointOfContact, doc); VToolPointOfContact *point = new VToolPointOfContact(doc, data, id, radius, center, firstPointId, secondPointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp index 54646ddae..920a2aa98 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp @@ -157,9 +157,10 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(const quint32 _id, co doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointOfIntersection, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointOfIntersection, doc); VToolPointOfIntersection *point = new VToolPointOfIntersection(doc, data, id, firstPointId, secondPointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp index 31718d1e6..fd7449b35 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp @@ -125,9 +125,10 @@ VToolPointOfIntersectionArcs *VToolPointOfIntersectionArcs::Create(const quint32 doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointOfIntersectionArcs, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointOfIntersectionArcs, doc); VToolPointOfIntersectionArcs *point = new VToolPointOfIntersectionArcs(doc, data, id, firstArcId, secondArcId, pType, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp index b5b11e80d..20816d8d8 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp @@ -144,9 +144,10 @@ VToolPointOfIntersectionCircles *VToolPointOfIntersectionCircles::Create(const q doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointOfIntersectionCircles, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointOfIntersectionCircles, doc); VToolPointOfIntersectionCircles *point = new VToolPointOfIntersectionCircles(doc, data, id, firstCircleCenterId, secondCircleCenterId, firstCircleRadius, diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp index d754ef988..b0bce324c 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp @@ -135,9 +135,10 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(const qui doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::PointOfIntersectionCurves, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::PointOfIntersectionCurves, doc); auto point = new VToolPointOfIntersectionCurves(doc, data, id, firstCurveId, secondCurveId, vCrossPoint, hCrossPoint, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp index e9cdfe780..c597d6dbb 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp @@ -168,9 +168,10 @@ VToolTriangle* VToolTriangle::Create(const quint32 _id, const QString &pointName doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Triangle, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Triangle, doc); VToolTriangle *point = new VToolTriangle(doc, data, id, axisP1Id, axisP2Id, firstPointId, secondPointId, typeCreation); scene->addItem(point); diff --git a/src/libs/vtools/tools/drawTools/vtoolline.cpp b/src/libs/vtools/tools/drawTools/vtoolline.cpp index a759265f9..b25c10d1e 100644 --- a/src/libs/vtools/tools/drawTools/vtoolline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolline.cpp @@ -169,9 +169,10 @@ VToolLine * VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, con doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Line, doc); + if (parse == Document::FullParse) { + VDrawTool::AddRecord(id, Tool::Line, doc); VToolLine *line = new VToolLine(doc, data, id, firstPoint, secondPoint, typeLine, lineColor, typeCreation); scene->addItem(line); InitDrawToolConnections(scene, line); diff --git a/src/libs/vtools/tools/nodeDetails/vnodearc.cpp b/src/libs/vtools/tools/nodeDetails/vnodearc.cpp index a8bce4185..c7660a3a5 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodearc.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodearc.cpp @@ -73,9 +73,9 @@ VNodeArc::VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 void VNodeArc::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document &parse, const Source &typeCreation, const QString &drawName, const quint32 &idTool) { - VAbstractTool::AddRecord(id, Tool::NodeArc, doc); if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::NodeArc, doc); VNodeArc *arc = new VNodeArc(doc, data, id, idArc, typeCreation, drawName, idTool, doc); doc->AddTool(id, arc); diff --git a/src/libs/vtools/tools/nodeDetails/vnodeellipticalarc.cpp b/src/libs/vtools/tools/nodeDetails/vnodeellipticalarc.cpp index 2b5d48027..2bc64a0b9 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodeellipticalarc.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodeellipticalarc.cpp @@ -46,9 +46,9 @@ void VNodeEllipticalArc::Create(VAbstractPattern *doc, VContainer *data, quint32 const Document &parse, const Source &typeCreation, const QString &drawName, const quint32 &idTool) { - VAbstractTool::AddRecord(id, Tool::NodeElArc, doc); if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::NodeElArc, doc); VNodeEllipticalArc *arc = new VNodeEllipticalArc(doc, data, id, idArc, typeCreation, drawName, idTool, doc); doc->AddTool(id, arc); diff --git a/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp index e4a272f12..cdc588f43 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp @@ -112,9 +112,9 @@ void VNodePoint::Create(VAbstractPattern *doc, VContainer *data, VMainGraphicsSc quint32 id, quint32 idPoint, const Document &parse, const Source &typeCreation, const QString &drawName, const quint32 &idTool) { - VAbstractTool::AddRecord(id, Tool::NodePoint, doc); if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::NodePoint, doc); //TODO Need create garbage collector and remove all nodes, what we don't use. //Better check garbage before each saving file. Check only modeling tags. VNodePoint *point = new VNodePoint(doc, data, id, idPoint, typeCreation, drawName, idTool, doc); diff --git a/src/libs/vtools/tools/nodeDetails/vnodespline.cpp b/src/libs/vtools/tools/nodeDetails/vnodespline.cpp index 945e4b34e..c59762801 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodespline.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodespline.cpp @@ -77,10 +77,10 @@ VNodeSpline *VNodeSpline::Create(VAbstractPattern *doc, VContainer *data, quint3 quint32 idSpline, const Document &parse, const Source &typeCreation, const QString &drawName, const quint32 &idTool) { - VAbstractTool::AddRecord(id, Tool::NodeSpline, doc); VNodeSpline *spl = nullptr; if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::NodeSpline, doc); spl = new VNodeSpline(doc, data, id, idSpline, typeCreation, drawName, idTool, doc); doc->AddTool(id, spl); diff --git a/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp index bdff4786a..11d9efb0b 100644 --- a/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp @@ -77,9 +77,9 @@ void VNodeSplinePath::Create(VAbstractPattern *doc, VContainer *data, quint32 id quint32 idSpline, const Document &parse, const Source &typeCreation, const QString &drawName, const quint32 &idTool) { - VAbstractTool::AddRecord(id, Tool::NodeSplinePath, doc); if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::NodeSplinePath, doc); VNodeSplinePath *splPath = new VNodeSplinePath(doc, data, id, idSpline, typeCreation, drawName, idTool, doc); doc->AddTool(id, splPath); diff --git a/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp b/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp index 0a3cb028c..11099fe6a 100644 --- a/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp +++ b/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp @@ -68,9 +68,9 @@ VToolPiecePath *VToolPiecePath::Create(quint32 _id, const VPiecePath &path, quin } } - VAbstractTool::AddRecord(id, Tool::PiecePath, doc); if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::PiecePath, doc); //TODO Need create garbage collector and remove all nodes, that we don't use. //Better check garbage before each saving file. Check only modeling tags. VToolPiecePath *pathTool = new VToolPiecePath(doc, data, id, pieceId, typeCreation, drawName, idTool, doc); diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index 8bd01f169..ee18926cd 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -127,10 +127,11 @@ VToolSeamAllowance *VToolSeamAllowance::Create(quint32 id, VPiece newPiece, QStr doc->UpdateToolData(id, data); } } - VAbstractTool::AddRecord(id, Tool::Piece, doc); + VToolSeamAllowance *piece = nullptr; if (parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::Piece, doc); piece = new VToolSeamAllowance(doc, data, id, typeCreation, scene, drawName); scene->addItem(piece); connect(piece, &VToolSeamAllowance::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 7ce70700c..eb05667f4 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -1375,9 +1375,9 @@ VToolUnionDetails* VToolUnionDetails::Create(const quint32 _id, const VToolUnion } //First add tool to file - VAbstractTool::AddRecord(id, Tool::UnionDetails, initData.doc); if (initData.parse == Document::FullParse) { + VAbstractTool::AddRecord(id, Tool::UnionDetails, initData.doc); //Scene doesn't show this tool, so doc will destroy this object. unionDetails = new VToolUnionDetails(id, initData); initData.doc->AddTool(id, unionDetails);