Added additional checks to method DialogTool::SetAssociatedTool.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-02 12:12:12 +03:00
parent 1f28154116
commit 49258cac8c

View File

@ -928,8 +928,16 @@ void DialogTool::Build(const Tool &type)
//---------------------------------------------------------------------------------------------------------------------
void DialogTool::SetAssociatedTool(VAbstractTool *tool)
{
this->associatedTool=tool;
SetToolId(tool->getId());
if (tool != nullptr)
{
associatedTool = tool;
SetToolId(tool->getId());
}
else
{
associatedTool = nullptr;
SetToolId(NULL_ID);
}
}
//---------------------------------------------------------------------------------------------------------------------