From: snn Date: Fri, 30 Nov 2018 07:39:15 +0000 (+0300) Subject: 0030392: XCAFDoc_GraphNode doesn't copy backward links X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=6131065fae2474309c617039ad5be15f1f05a813;p=occt-copy.git 0030392: XCAFDoc_GraphNode doesn't copy backward links --- diff --git a/src/XCAFDoc/XCAFDoc_GraphNode.cxx b/src/XCAFDoc/XCAFDoc_GraphNode.cxx index 5373293c39..b246abb268 100644 --- a/src/XCAFDoc/XCAFDoc_GraphNode.cxx +++ b/src/XCAFDoc/XCAFDoc_GraphNode.cxx @@ -360,6 +360,8 @@ void XCAFDoc_GraphNode::Paste(const Handle(TDF_Attribute)& into, } if (!func.IsNull()) { intof->SetFather(func); + if (func->ChildIndex(this) && !func->ChildIndex(intof)) + func->SetChild(intof); } } @@ -370,6 +372,8 @@ void XCAFDoc_GraphNode::Paste(const Handle(TDF_Attribute)& into, } if (!func.IsNull()) { intof->SetChild(func); + if (func->FatherIndex(this) && !func->FatherIndex(intof)) + func->SetFather(intof); } } intof->SetGraphID(myGraphID);