Fix crash if tool is not ready yet.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-08-21 17:36:59 +03:00
parent d3b6999ec0
commit 07be09c577

View File

@ -202,13 +202,12 @@ void VWidgetDetails::ToggledPieceItem(QTableWidgetItem *item)
try
{
tool = qobject_cast<VToolSeamAllowance*>(VAbstractPattern::getTool(id));
tool->setVisible(ui->checkBoxHideNotInLayout->isChecked() ? inLayout : true);
}
catch (VExceptionBadId &)
{
// do nothing
}
tool->setVisible(ui->checkBoxHideNotInLayout->isChecked() ? inLayout : true);
}
}