From 919633440f11b77c58cc5f93167b1d0d3dfee3b3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 16 Jan 2018 19:32:25 +0200 Subject: [PATCH] Fixed issue #799. Copy piece tool crashes Valentina. --HG-- branch : develop --- src/libs/vtools/tools/nodeDetails/vtoolpin.cpp | 1 + src/libs/vtools/tools/vabstracttool.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libs/vtools/tools/nodeDetails/vtoolpin.cpp b/src/libs/vtools/tools/nodeDetails/vtoolpin.cpp index 90fa9b68d..0542a9f96 100644 --- a/src/libs/vtools/tools/nodeDetails/vtoolpin.cpp +++ b/src/libs/vtools/tools/nodeDetails/vtoolpin.cpp @@ -72,6 +72,7 @@ VToolPin *VToolPin::Create(VToolPinInitData initData) return nullptr;// Just ignore } VPointF *pinPoint = new VPointF(*point); + pinPoint->setIdObject(initData.pointId); pinPoint->setMode(Draw::Modeling); initData.data->UpdateGObject(initData.id, pinPoint); if (initData.parse != Document::FullParse) diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index f704b2165..58a71b098 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -229,6 +229,7 @@ quint32 VAbstractTool::CreateNode(VContainer *data, quint32 id) //We can't use exist object. Need create new. T *node = new T(*data->GeometricObject(id).data()); node->setMode(Draw::Modeling); + node->setIdObject(id); return data->AddGObject(node); }