]> OCCT Git - occt-copy.git/commitdiff
0030392: XCAFDoc_GraphNode doesn't copy backward links CR30392
authorsnn <snn@opencascade.com>
Fri, 30 Nov 2018 07:39:15 +0000 (10:39 +0300)
committernds <nds@opencascade.com>
Mon, 2 Sep 2019 13:21:39 +0000 (16:21 +0300)
src/XCAFDoc/XCAFDoc_GraphNode.cxx

index 7ce30e7af5ccabb2ee939c11ce10e8c6f26a7116..46e835cd13880a14eadc82efcd45300433f5dbc3 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);