Salome HOME
Adding test for bos #41748 [CEA] Issue in interpolation edition
[modules/shaper.git] / src / XGUI / XGUI_Tools.cpp
index e04bc4547e2128eb019482b990707cdc2b492352..0b1d37a6433ca1c706d03c550628a4b3d0dd4ca4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 #include <Events_InfoMessage.h>
 
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_CompoundBuilder.h>
+#include <GeomAPI_IndexedMapOfShape.h>
 
 #include <TopoDS_Shape.hxx>
 
@@ -300,7 +300,8 @@ QString generateName(const ModuleBase_ViewerPrsPtr& thePrs)
           aTypeName = "shape";
           break;
         }
-        int aId = GeomAlgoAPI_CompoundBuilder::id(aContext, aSubShape);
+        GeomAPI_IndexedMapOfShape aSubShapesMap (aContext);
+        int aId = aSubShapesMap.FindIndexEqualLocations(aSubShape);
         aName += QString("/%1_%2").arg(aTypeName).arg(aId);
       }
     }