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=b00e9a2be9cdec84d4e5e2ff572c5bd363b43555;p=occt-copy.git 0030392: XCAFDoc_GraphNode doesn't copy backward links (cherry picked from commit 6131065fae2474309c617039ad5be15f1f05a813) (cherry picked from commit 713624228050b8f7db4d8b2e22c7edfd8c832471) (cherry picked from commit b7fb7db6ae971efcf9ce0b5283a89328c4dce1bb) (cherry picked from commit 68be9e7b9c5851087d57aeec9809012e4dc460b8) (cherry picked from commit 6bc54a6b6fc335b802959d612f0ed4edbb5d5c33) (cherry picked from commit ca5e48596204efa0b86bcbe6a60ce1bf612341a1) (cherry picked from commit fcc93b4f342c14aed2ee39a4cfe14bbcb6e54ad4) --- diff --git a/src/XCAFDoc/XCAFDoc_GraphNode.cxx b/src/XCAFDoc/XCAFDoc_GraphNode.cxx index efa73c447d..277d994c58 100644 --- a/src/XCAFDoc/XCAFDoc_GraphNode.cxx +++ b/src/XCAFDoc/XCAFDoc_GraphNode.cxx @@ -379,6 +379,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); } } @@ -392,6 +394,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);