if(!obj->_is_nil()){
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(obj->GetObject());
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow(obj->GetObject());
-
+ QString objType = CheckTypeObject(IObject);
if ( !aGroup->_is_nil() ) { // DELETE GROUP
SMESH::SMESH_Mesh_var aMesh = aGroup->GetMesh();
aMesh->RemoveGroup( aGroup );
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
aMesh->RemoveSubMesh( aSubMesh );
}
+ else if ( objType == "Hypothesis" || objType == "Algorithm" ) {// DELETE HYPOTHESIS
+ SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
+ aStudyBuilder->RemoveObjectWithChildren( obj );
+ }
else {// default action: remove SObject from the study
// san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH
//QAD_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy);