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,9 +928,17 @@ void DialogTool::Build(const Tool &type)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogTool::SetAssociatedTool(VAbstractTool *tool) void DialogTool::SetAssociatedTool(VAbstractTool *tool)
{ {
this->associatedTool=tool; if (tool != nullptr)
{
associatedTool = tool;
SetToolId(tool->getId()); SetToolId(tool->getId());
} }
else
{
associatedTool = nullptr;
SetToolId(NULL_ID);
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
template <typename GObject> template <typename GObject>