]> OCCT Git - occt-copy.git/commitdiff
0030392: XCAFDoc_GraphNode doesn't copy backward links
authorsnn <snn@opencascade.com>
Fri, 30 Nov 2018 07:39:15 +0000 (10:39 +0300)
committernds <nds@opencascade.com>
Tue, 30 Apr 2019 12:39:09 +0000 (15:39 +0300)
(cherry picked from commit 6131065fae2474309c617039ad5be15f1f05a813)

src/XCAFDoc/XCAFDoc_GraphNode.cxx

index f83ad70e3c3aa18817e73c4cf8a218ee4b9b8921..2ac1e5d23ef89b71a1df39f28bd7311c1978afc3 100644 (file)
@@ -378,6 +378,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);
     }
   }
 
@@ -391,6 +393,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);