X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_subMesh.cxx;h=5ced47044202db7d261aa46333ee92ad05363db9;hb=973402fcd3e362eb61f1561da154817f125034e5;hp=19df51879a632adabcfc1260007c7178aed8b9e1;hpb=89682777f7aaf6ec0b3cccf21320ccd4576dcfc7;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 19df51879..5ced47044 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1049,6 +1049,9 @@ SMESH_Hypothesis::Hypothesis_Status if ( stateChange && _algoState == HYP_OK ) // hyp becomes OK algo->SetEventListener( this ); + if ( event == REMOVE_ALGO || event == REMOVE_FATHER_ALGO ) + _algo = 0; + notifyListenersOnEvent( event, ALGO_EVENT, anHyp ); if ( stateChange && oldAlgoState == HYP_OK ) { // hyp becomes KO @@ -1248,8 +1251,7 @@ void SMESH_subMesh::cleanDependsOn( SMESH_Algo* algoRequiringCleaning/*=0*/ ) void SMESH_subMesh::DumpAlgoState(bool isMain) { - int dim = SMESH_Gen::GetShapeDim(_subShape); -// if (dim < 1) return; + // if (dim < 1) return; if (isMain) { const map < int, SMESH_subMesh * >&subMeshes = DependsOn(); @@ -1261,8 +1263,9 @@ void SMESH_subMesh::DumpAlgoState(bool isMain) sm->DumpAlgoState(false); } } - int type = _subShape.ShapeType(); - MESSAGE("dim = " << dim << " type of shape " << type); + //int type = _subShape.ShapeType(); + MESSAGE("dim = " << SMESH_Gen::GetShapeDim(_subShape) << + " type of shape " << _subShape.ShapeType()); switch (_algoState) { case NO_ALGO: @@ -1512,7 +1515,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event) { ret = algo->Compute((*_father), shape); } - if ( !_computeError || ( !ret && _computeError->IsOK() ) ) // algo can set _computeError of submesh + if ( !_computeError || (/* !ret && */_computeError->IsOK() ) ) // algo can set _computeError of submesh _computeError = algo->GetComputeError(); } catch ( ::SMESH_ComputeError& comperr ) { @@ -2272,7 +2275,7 @@ void SMESH_subMesh::notifyListenersOnEvent( const int event, li_da.first->ProcessEvent( event, eventType, this, li_da.second, hyp ); - if ( !isDeletable || !_eventListeners.count( li_da.first )) + if ( !isDeletable || _eventListeners.count( li_da.first )) li_da.first->myBusySM.erase( this ); // a listener is hopefully not dead } }