From 8bf036a0567357d4bd92c3fe08a4130b965b4643 Mon Sep 17 00:00:00 2001 From: snn Date: Fri, 30 Nov 2018 10:39:15 +0300 Subject: [PATCH] 0030392: XCAFDoc_GraphNode doesn't copy backward links --- src/XCAFDoc/XCAFDoc_GraphNode.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/XCAFDoc/XCAFDoc_GraphNode.cxx b/src/XCAFDoc/XCAFDoc_GraphNode.cxx index 7ce30e7af5..46e835cd13 100644 --- a/src/XCAFDoc/XCAFDoc_GraphNode.cxx +++ b/src/XCAFDoc/XCAFDoc_GraphNode.cxx @@ -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); -- 2.39.5