Salome HOME
Merge branch 'occ/shaper2smesh'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_GroupOnShapeDlg.cxx
index 9a939559b2a691b524037d2e544e826df25949d9..9054ad855a30fb13ff598b7e4ac2b3b34e30630d 100644 (file)
@@ -220,12 +220,12 @@ SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var ge
     case GEOM::COMPOUND: break;
     default:             return SMESH::ALL;
     }
     case GEOM::COMPOUND: break;
     default:             return SMESH::ALL;
     }
-    GEOM::GEOM_IShapesOperations_wrap aShapeOp =
-      SMESH::GetGEOMGen()->GetIShapesOperations();
+    GEOM::GEOM_Gen_var                 geomGen = SMESH::GetGEOMGen( geom );
+    GEOM::GEOM_IShapesOperations_wrap aShapeOp = geomGen->GetIShapesOperations();
 
 
-    if ( geom->GetType() == 37 ) // geom group
-      GEOM::GEOM_IGroupOperations_wrap aGroupOp =
-        SMESH::GetGEOMGen()->GetIGroupOperations();
+    if ( geom->GetType() == 37 ) // geom group
+    {
+      GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations();
       if ( !aGroupOp->_is_nil() ) {
         // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
       if ( !aGroupOp->_is_nil() ) {
         // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
@@ -236,7 +236,8 @@ SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var ge
         }
       }
     }
         }
       }
     }
-    else if ( !aShapeOp->_is_nil() ) { // just a compoud shape
+    else if ( !aShapeOp->_is_nil() ) // just a compoud shape
+    {
       GEOM::ListOfLong_var ids = aShapeOp->SubShapeAllIDs( geom, GEOM::SHAPE, false );
       if ( ids->length() ) {
         GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( geom, ids[0] );
       GEOM::ListOfLong_var ids = aShapeOp->SubShapeAllIDs( geom, GEOM::SHAPE, false );
       if ( ids->length() ) {
         GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( geom, ids[0] );