Fixed issue #799. Copy piece tool crashes Valentina.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-16 19:32:25 +02:00
parent f8b673d5eb
commit 919633440f
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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<T>(id).data());
node->setMode(Draw::Modeling);
node->setIdObject(id);
return data->AddGObject(node);
}