Salome HOME
Bug 0016155: EDF PAL 447: If the shape is a Shell, disable 3D tab.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ShapeByMeshDlg.cxx
index ba45e57351e91d82b53a7f118bebabdab524a74f..40ff7e1182209bbad7916941bb0281af4979ddde 100644 (file)
@@ -239,13 +239,13 @@ void SMESHGUI_ShapeByMeshOp::SetMesh (SMESH::SMESH_Mesh_ptr thePtr)
   myGeomObj = GEOM::GEOM_Object::_nil();
   myHasSolids = false;
 
-  vector< bool > hasElement (myDlg->myElemTypeGroup->buttons().count(), false);
+  std::vector< bool > hasElement (myDlg->myElemTypeGroup->buttons().count(), false);
   if (!myMesh->_is_nil() )
     {
       //     _PTR(SObject) aSobj = SMESH::FindSObject(myMesh.in());
       //     SUIT_DataOwnerPtr anIObj (new LightApp_DataOwner(aSobj->GetID().c_str()));
 
-      vector< int > nbShapes( TopAbs_SHAPE, 0 );
+      std::vector< int > nbShapes( TopAbs_SHAPE, 0 );
       int shapeDim = 0; // max dim with several shapes
       //if ( /*mySelectionMgr*/ selectionMgr()->isOk(anIObj) ) // check that the mesh has a valid shape
       {
@@ -306,8 +306,9 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
     if (aListId.count() == 1)
       {
        int elemID = (aListId.first()).toInt();
-       myGeomObj = SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
-         ( myMesh.in(), elemID, myDlg->myGeomName->text().toLatin1().data());
+       myGeomObj = GEOM::GEOM_Object::_duplicate(
+           SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
+         ( myMesh.in(), elemID, myDlg->myGeomName->text().toLatin1().constData()) );
       }
     else
       {