From f4093a327febf796835556ccfc3733edac40e3e2 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 7 Dec 2006 13:11:24 +0000 Subject: [PATCH] PAL13473 (Build repetitive mesh): notify dependent submesh on successful COMPUTE event --- src/SMESH/SMESH_subMesh.cxx | 19 +++++++++++++++---- src/SMESH/SMESH_subMeshEventListener.hxx | 3 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 1701da600..2fe40906c 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1913,7 +1913,8 @@ void SMESH_subMesh::DeleteOwnListeners() * \param hyp - hypothesis, if eventType is algo_event * * The base implementation translates CLEAN event to the subMesh - * stored in listener data + * stored in listener data. Also it sends SUBMESH_COMPUTED event in case of + * successful COMPUTE event. */ //================================================================================ @@ -1923,9 +1924,19 @@ void SMESH_subMeshEventListener::ProcessEvent(const int event, EventListenerData* data, SMESH_Hypothesis* /*hyp*/) { - if ( event == SMESH_subMesh::CLEAN && eventType == SMESH_subMesh::COMPUTE_EVENT ) - if ( data && !data->mySubMeshes.empty() ) { - ASSERT( data->mySubMeshes.front() != subMesh ); + if ( data && !data->mySubMeshes.empty() && + eventType == SMESH_subMesh::COMPUTE_EVENT) + { + ASSERT( data->mySubMeshes.front() != subMesh ); + switch ( event ) { + case SMESH_subMesh::CLEAN: data->mySubMeshes.front()->ComputeStateEngine( event ); + break; + case SMESH_subMesh::COMPUTE: + if ( subMesh->GetComputeState() == SMESH_subMesh::COMPUTE_OK ) + data->mySubMeshes.front()->ComputeStateEngine( SMESH_subMesh::SUBMESH_COMPUTED ); + break; + default:; } + } } diff --git a/src/SMESH/SMESH_subMeshEventListener.hxx b/src/SMESH/SMESH_subMeshEventListener.hxx index f8a5fc4be..2424bfe54 100644 --- a/src/SMESH/SMESH_subMeshEventListener.hxx +++ b/src/SMESH/SMESH_subMeshEventListener.hxx @@ -55,7 +55,8 @@ public: * \param hyp - hypothesis, if eventType is algo_event * * The base implementation translates CLEAN event to the subMesh stored - * in the listener data + * in the listener data. Also it sends SUBMESH_COMPUTED event in case of + * successful COMPUTE event. */ virtual void ProcessEvent(const int event, const int eventType, -- 2.39.2