From: ika Date: Mon, 5 Jun 2017 11:29:34 +0000 (+0300) Subject: refs #54: fix problem with subshapes in opened xbf file. X-Git-Tag: V_01_2017_06_30~1 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=6b5caeaacf1e44ea8f75664541dd81a55f41944b;p=occt-copy.git refs #54: fix problem with subshapes in opened xbf file. --- diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 36b0479d42..f550ad7e81 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -1031,8 +1031,11 @@ Standard_Boolean XCAFDoc_ShapeTool::IsSubShape (const TDF_Label &shapeL, const TopoDS_Shape &sub) const { Handle(XCAFDoc_ShapeMapTool) A; - if ( ! shapeL.FindAttribute(XCAFDoc_ShapeMapTool::GetID(), A) ) - return Standard_False; + if (!shapeL.FindAttribute(XCAFDoc_ShapeMapTool::GetID(), A)) { + A = XCAFDoc_ShapeMapTool::Set(shapeL); + TopoDS_Shape aShape = GetShape(shapeL); + A->SetShape(aShape); + } //TopoDS_Shape S = GetShape ( shapeL ); //return ! S.IsNull() && CheckSubShape ( S, sub );