From: eap Date: Tue, 10 Apr 2007 15:41:54 +0000 (+0000) Subject: PAL13330( When mesh generation does not success, trace where ) X-Git-Tag: V3_2_6pre4~15 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=ade1823d8869f08a36104eab88074a64433324dc PAL13330( When mesh generation does not success, trace where ) avoid overriding the error set by ApplyToCollection() --- diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 615d5bbbc..fcec36a15 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1358,7 +1358,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event) if (_father->HasShapeToMesh() ) { bool subComputed = SubMeshesComputed(); ret = ( algo->NeedDescretBoundary() ? subComputed : - ( _father->IsNotConformAllowed() || !subComputed )); + ( !subComputed || _father->IsNotConformAllowed() )); if (!ret) { _computeState = FAILED_TO_COMPUTE; if ( !algo->NeedDescretBoundary() ) @@ -1392,7 +1392,10 @@ bool SMESH_subMesh::ComputeStateEngine(int event) else ret = algo->Compute((*_father), _subShape); } - _computeError = algo->GetComputeError(); + if ( !ret ) + if ( SMESH_ComputeErrorPtr err = algo->GetComputeError()) + if ( !err->IsOK() ) // avoid overriding the error set by ApplyToCollection() + _computeError = err; } catch (Standard_Failure& exc) { if ( !_computeError ) _computeError = SMESH_ComputeError::New();