X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ShapeByMeshDlg.cxx;h=6647f4cdc00b76ec4dfb83dfb833f68829ec158a;hp=6bff0c7ece87d602dad77ff6046b3e1f155ad505;hb=6d32f944a0a115b6419184c50b57bf7c4eef5786;hpb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115 diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 6bff0c7ec..6647f4cdc 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -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 ] ); @@ -314,18 +314,17 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() // GEOM_Object is published -> no need to UnRegister() myGeomObj = GEOM::GEOM_Object::_duplicate (SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement - ( myMesh.in(), elemID, myDlg->myGeomName->text().toLatin1().constData()) ); + ( myMesh.in(), elemID, myDlg->myGeomName->text().toUtf8().constData()) ); } 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,10 +385,9 @@ 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, - aNewGeomGroupName.toLatin1().data(), aMeshShape); + geomGen->AddInStudy( aGeomObject, + aNewGeomGroupName.toUtf8().data(), aMeshShape); // get a GEOM_Object already published, which doesn't need UnRegister() CORBA::Object_var obj = aNewGroupSO->GetObject();