]> 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)
committersnn <snn@opencascade.com>
Fri, 30 Nov 2018 07:39:15 +0000 (10:39 +0300)
src/XCAFDoc/XCAFDoc_GraphNode.cxx

index 5373293c39503b2f4c86535ec7dbbb06ffcd9a27..b246abb268243262c841f18c34d3b7aa93e06e28 100644 (file)
@@ -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);