From 0b5d066b63ecc6463ce06897777cd79adeff5c45 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 29 Dec 2019 13:49:57 +0200 Subject: [PATCH] Fix crash after uniting three pieces in sequence. --HG-- branch : release --- ChangeLog.txt | 1 + src/libs/vtools/tools/vtooluniondetails.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 89f4b9919..7e9f18f8e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -33,6 +33,7 @@ - [#978] Don't show errors in History dialog. - Fixed translation numbers in scientific notation. - Fix dialog for tool Point along perpendicular. No memory of line color settings. +- Fix crash after uniting three pieces in sequence. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 3ae47fa0f..b7e91afb8 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -413,6 +413,7 @@ quint32 AddNodePoint(const VPieceNode &node, const VToolUnionDetailsInitData &in const quint32 idObject = initData.data->AddGObject(point.take()); children.append(idObject); + point1->setIdObject(idObject); point1->setMode(Draw::Modeling); const quint32 id = initData.data->AddGObject(point1.take()); @@ -540,6 +541,7 @@ quint32 AddNodeArc(const VPieceNode &node, const VToolUnionDetailsInitData &init const quint32 idObject = initData.data->AddGObject(arc1.take()); children.append(idObject); + arc2->setIdObject(idObject); arc2->setMode(Draw::Modeling); const quint32 id = initData.data->AddGObject(arc2.take()); @@ -593,6 +595,7 @@ quint32 AddNodeElArc(const VPieceNode &node, const VToolUnionDetailsInitData &in const quint32 idObject = initData.data->AddGObject(arc1.take()); children.append(idObject); + arc2->setIdObject(idObject); arc2->setMode(Draw::Modeling); const quint32 id = initData.data->AddGObject(arc2.take()); @@ -638,6 +641,7 @@ quint32 AddNodeSpline(const VPieceNode &node, const VToolUnionDetailsInitData &i children.append(idObject); VSpline *spl1 = new VSpline(*spl); + spl1->setIdObject(idObject); spl1->setMode(Draw::Modeling); const quint32 id = initData.data->AddGObject(spl1); @@ -711,6 +715,7 @@ quint32 AddNodeSplinePath(const VPieceNode &node, const VToolUnionDetailsInitDat const quint32 idObject = initData.data->AddGObject(path.take()); children.append(idObject); + path1->setIdObject(idObject); path1->setMode(Draw::Modeling); const quint32 id = initData.data->AddGObject(path1.take());