Cover case when we can safely ignore broken union details operation.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2020-01-11 15:08:55 +02:00
parent c81faf3537
commit 2a95c41bb7

View File

@ -1646,12 +1646,21 @@ void UniteDetails(const VToolUnionDetailsInitData &initData)
CreateUnitedDetail(initData, dx, dy, det1p1.GetId(), angle);
}
else
{
try
{
const VPiecePath d1Path = GetPiece1MainPath(initData.doc, initData.id);
const VPiecePath d2Path = GetPiece2MainPath(initData.doc, initData.id);
UnionInitParameters(initData, d1Path, d2Path, det1p1, dx, dy, angle);
UpdateUnitedDetail(initData, dx, dy, det1p1.GetId(), angle);
}
catch (const VExceptionBadId &)
{
// There is a chance that the tool depends on an already deleted object. We can skip updating in this case.
// We still can get error in child in case we should not get an error here. Debug will be a little bit
// obscured. But if this happened something really bad happened.
}
}
}
} // static functions