0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies
[occt.git] / src / XCAFDoc / XCAFDoc_ShapeTool.cxx
index 36b0479..fac6a71 100644 (file)
@@ -998,8 +998,12 @@ void XCAFDoc_ShapeTool::UpdateAssemblies()
   // Iterate over the free shapes
   for ( TDF_LabelSequence::Iterator anIt(aRootLabels); anIt.More(); anIt.Next() )
   {
-    const TDF_Label& aRootLab = anIt.Value();
-
+    TDF_Label aRefLabel = anIt.Value();
+    if (IsReference(aRefLabel))
+    {
+      GetReferredShape(aRefLabel, aRefLabel);
+    }
+    const TDF_Label& aRootLab = aRefLabel;
     TopoDS_Shape anAssemblyShape;
     updateComponent(aRootLab, anAssemblyShape);
   }