]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the dump to python for model from the issue #1739
authormpv <mpv@opencascade.com>
Wed, 7 Sep 2016 13:56:42 +0000 (16:56 +0300)
committermpv <mpv@opencascade.com>
Wed, 7 Sep 2016 13:56:42 +0000 (16:56 +0300)
src/Model/Model_SelectionNaming.cpp

index 3b2cfba3118ae7b6f3a1f4c1fd38ec3a394da9e1..567d4a867c3bf4282c0c155fa30b426f9342c887 100644 (file)
@@ -75,8 +75,13 @@ std::string Model_SelectionNaming::getShapeName(
           int aDepth = anObjL.Depth();
           if (aDepth == 5 || aDepth == 7) {
             ObjectPtr anObj = theDoc->objects()->object(anObjL);
-            if (anObj) {
-              aName = anObj->data()->name() + "/" + aName;
+            if (anObj.get()) {
+              ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
+              if (aRes.get()) {
+                if (aRes && !aRes->shape()->impl<TopoDS_Shape>().IsEqual(theShape)) {
+                  aName = anObj->data()->name() + "/" + aName;
+                }
+              }
             }
           }
         }