From 188db900506f1f60a09a575e7c2b54e059c7ed20 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 7 Apr 2018 13:36:56 +0300 Subject: [PATCH] Automatically disable check for uniqness for the second point after uniting. ref #835. --HG-- branch : develop --- src/libs/vtools/tools/vtooluniondetails.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 214025956..6937b895c 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -1913,9 +1913,17 @@ QVector > VToolUnionDetails::CalcUnitedPath(const VPiece qint32 pointsD2 = 0; //Keeps number points the second detail, that we have already added. qint32 i = 0; const int det1P1Index = d1Path.indexOfNode(pRotate); + bool checkUniqueness = false; do { - path.append(qMakePair(true, d1Path.at(i))); + VPieceNode node = d1Path.at(i); + if (checkUniqueness) + { + // See issue #835. Union Tool - changes in workpiece tool can't be saved because of double points + node.SetCheckUniqueness(false); + checkUniqueness = false; + } + path.append(qMakePair(true, node)); ++i; if (i > det1P1Index && pointsD2 < countNodeD2-1) { @@ -1931,6 +1939,7 @@ QVector > VToolUnionDetails::CalcUnitedPath(const VPiece ++pointsD2; ++j; } while (pointsD2 < countNodeD2-1); + checkUniqueness = true; } } while (i < countNodeD1);