From 84e7a4b1c84a98885aa3c88a71672ec9e07122e5 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 20 May 2009 15:46:49 +0000 Subject: [PATCH] 0020279: [CEA 334] control the "random" use when using mesh algorithms fix SetSourceMesh(): set mesh before calling NotifySubMeshesHypothesisModification() --- src/StdMeshers/StdMeshers_ProjectionSource1D.cxx | 7 +++---- src/StdMeshers/StdMeshers_ProjectionSource2D.cxx | 8 ++++---- src/StdMeshers/StdMeshers_ProjectionSource3D.cxx | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx index c7f2e76c9..8c88c8eba 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx @@ -23,7 +23,6 @@ // File : StdMeshers_ProjectionSource1D.cxx // Author : Edward AGAPOV // Module : SMESH -// $Header$ // #include "StdMeshers_ProjectionSource1D.hxx" @@ -127,9 +126,10 @@ void StdMeshers_ProjectionSource1D::SetVertexAssociation(const TopoDS_Shape& sou void StdMeshers_ProjectionSource1D::SetSourceMesh(SMESH_Mesh* mesh) { - if ( _sourceMesh != mesh ) + if ( _sourceMesh != mesh ) { + _sourceMesh = mesh; NotifySubMeshesHypothesisModification(); - _sourceMesh = mesh; + } } //============================================================================= @@ -228,4 +228,3 @@ void StdMeshers_ProjectionSource1D::RestoreParams(const TopoDS_Shape& s1, _targetVertex = TopoDS::Vertex( s3 ); _sourceMesh = mesh; } - diff --git a/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx index a33f7d70d..fc21c8954 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx @@ -23,8 +23,7 @@ // File : StdMeshers_ProjectionSource2D.cxx // Author : Edward AGAPOV // Module : SMESH -// $Header$ -// + #include "StdMeshers_ProjectionSource2D.hxx" #include "SMESH_Mesh.hxx" @@ -137,9 +136,10 @@ void StdMeshers_ProjectionSource2D::SetVertexAssociation(const TopoDS_Shape& sou void StdMeshers_ProjectionSource2D::SetSourceMesh(SMESH_Mesh* mesh) { - if ( _sourceMesh != mesh ) + if ( _sourceMesh != mesh ) { + _sourceMesh = mesh; NotifySubMeshesHypothesisModification(); - _sourceMesh = mesh; + } } //============================================================================= diff --git a/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx index 190094542..02246294e 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx @@ -23,8 +23,7 @@ // File : StdMeshers_ProjectionSource3D.cxx // Author : Edward AGAPOV // Module : SMESH -// $Header$ -// + #include "StdMeshers_ProjectionSource3D.hxx" #include "utilities.h" @@ -136,9 +135,10 @@ void StdMeshers_ProjectionSource3D::SetVertexAssociation(const TopoDS_Shape& sou void StdMeshers_ProjectionSource3D::SetSourceMesh(SMESH_Mesh* mesh) { - if ( _sourceMesh != mesh ) + if ( _sourceMesh != mesh ) { + _sourceMesh = mesh; NotifySubMeshesHypothesisModification(); - _sourceMesh = mesh; + } } //============================================================================= -- 2.39.2