From: sln Date: Wed, 24 Aug 2005 14:15:10 +0000 (+0000) Subject: editMeshOrSubMesh method fixed for correct work with sub-meshes X-Git-Tag: T_3_0_2a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd82c5b373163e878beaf8c27a543d2d381d90b5;p=modules%2Fsmesh.git editMeshOrSubMesh method fixed for correct work with sub-meshes --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index ac30ec89b..4882a7207 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -945,13 +945,13 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess ) // assign new hypotheses if ( aNewHypIndex != -1 ) { - if ( myIsMesh ) - { - SMESH::SMESH_Mesh_var aVar = + SMESH::SMESH_Mesh_var aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST(SObject,pObj)->GetObject() ); - if ( !aVar->_is_nil() ) - SMESH::AddHypothesisOnMesh( - aVar, myExistingHyps[ dim ][ hypType ][ aNewHypIndex ] ); + bool isMesh = !aMeshVar->_is_nil(); + if ( isMesh ) + { + SMESH::AddHypothesisOnMesh( + aMeshVar, myExistingHyps[ dim ][ hypType ][ aNewHypIndex ] ); } else {