X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ShapeByMeshDlg.cxx;h=b17fed16fd0713ebb412cca2a8daf608201d8229;hb=f816f204d33b5250ee211247a798a1af42c528ea;hp=6bff0c7ece87d602dad77ff6046b3e1f155ad505;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 6bff0c7ec..b17fed16f 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -287,7 +287,7 @@ void SMESHGUI_ShapeByMeshOp::SetMesh (SMESH::SMESH_Mesh_ptr thePtr) myHasSolids = nbShapes[ TopAbs_SOLID ]; } - // disable inexistant elem types + // disable inexistent elem types for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) { if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) ) button->setEnabled( hasElement[ i ] ); @@ -319,13 +319,12 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() else { GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (geomGen->_is_nil() || !aStudy) + if (geomGen->_is_nil()) return; GEOM::GEOM_IShapesOperations_wrap aShapesOp = - geomGen->GetIShapesOperations(aStudy->StudyId()); + geomGen->GetIShapesOperations(); if (aShapesOp->_is_nil() ) return; @@ -364,7 +363,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() else if (aNumberOfGO > 1) { GEOM::GEOM_IGroupOperations_wrap aGroupOp = - geomGen->GetIGroupOperations(aStudy->StudyId()); + geomGen->GetIGroupOperations(); if(aGroupOp->_is_nil()) return; @@ -386,9 +385,8 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() // publish the GEOM object in study QString aNewGeomGroupName ( myDlg->myGeomName->text() ); - SALOMEDS::Study_var aStudyVar = _CAST(Study,aStudy)->GetStudy(); SALOMEDS::SObject_wrap aNewGroupSO = - geomGen->AddInStudy( aStudyVar, aGeomObject, + geomGen->AddInStudy( aGeomObject, aNewGeomGroupName.toLatin1().data(), aMeshShape); // get a GEOM_Object already published, which doesn't need UnRegister()