X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=b52f7308e83f86ff1b7e8e002882c836dc1d9b38;hp=2c5d1828c0d7b0081216aa87557eab4dcc60d56c;hb=20c126bc220757c06b5576f71ed6f34ae85e3e40;hpb=1b57300c826e4cb17d9a40124991a14eabb9eee8 diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 2c5d1828c..b52f7308e 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -612,23 +612,21 @@ namespace SMESH return res < SMESH::HYP_UNKNOWN_FATAL; } - bool RemoveHypothesisOrAlgorithmOnMesh (_PTR(SObject) MorSM, + bool RemoveHypothesisOrAlgorithmOnMesh (_PTR(SObject) MorSM, SMESH::SMESH_Hypothesis_ptr anHyp) { - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; int res = SMESH::HYP_UNKNOWN_FATAL; SUIT_OverrideCursor wc; if (MorSM) { try { GEOM::GEOM_Object_var aShapeObject = SMESH::GetShapeOnMeshOrSubMesh(MorSM); - SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface(MorSM); - SMESH::SMESH_subMesh_var aSubMesh = SMESH::SObjectToInterface(MorSM); - + SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface(MorSM); + SMESH::SMESH_subMesh_var aSubMesh = SMESH::SObjectToInterface(MorSM); + if (!aSubMesh->_is_nil()) aMesh = aSubMesh->GetFather(); - + if (!aMesh->_is_nil()) { if (aMesh->HasShapeToMesh() && !aShapeObject->_is_nil()) { res = aMesh->RemoveHypothesis(aShapeObject, anHyp);