From 6b5caeaacf1e44ea8f75664541dd81a55f41944b Mon Sep 17 00:00:00 2001 From: ika Date: Mon, 5 Jun 2017 14:29:34 +0300 Subject: [PATCH] refs #54: fix problem with subshapes in opened xbf file. --- src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 );