]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHGUI/SMESHGUI.cxx
Salome HOME
PAL9524 - unassign a hypothesis when Edit/Delete called for it
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 34c82ee213ee397bdc8dea3f004e8e669432c7c2..798cb8d19d817b019f769a3f30008fcc2308d32f 100644 (file)
@@ -767,7 +767,7 @@ namespace{
        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 );
@@ -776,6 +776,10 @@ namespace{
            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);