Salome HOME
BUG: SMESH::GetGEOMGen() returns GEOM_Engine instead of SHAPERSTUDY
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshOp.cxx
index 9e30fe25af9c7727f6db73a69dee26e2802b9569..36b530a391a342b0a4d0d9af2fece78bb2f98a2f 100644 (file)
@@ -1854,11 +1854,11 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
   else if (aGEOMs.count() > 1)
   {
     // create a GEOM group
   else if (aGEOMs.count() > 1)
   {
     // create a GEOM group
-    GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-    if (!geomGen->_is_nil()) {
-      GEOM::GEOM_IGroupOperations_ptr op =
-        geomGen->GetIGroupOperations();
-      if (!op->_is_nil()) {
+    GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen( mainGeom );
+    if ( !geomGen->_is_nil() ) {
+      GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
+      if ( !op->_is_nil() )
+      {
         // check and add all selected GEOM objects: they must be
         // a sub-shapes of the main GEOM and must be of one type
         int iSubSh = 0;
         // check and add all selected GEOM objects: they must be
         // a sub-shapes of the main GEOM and must be of one type
         int iSubSh = 0;