mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-16 13:13:08 +05:00
regression of grid test SMESH_TEST/Grids/smesh/imps/G0
Since CLEAN event doesn't reach the shape to mesh at hyp modification any longer, set event listeners on all involved source submeshes
This commit is contained in:
parent
f1c147c629
commit
329743184a
@ -303,14 +303,16 @@ namespace // INTERNAL STUFF
|
|||||||
// set listener to hear events of the submesh computed by "Import" algo
|
// set listener to hear events of the submesh computed by "Import" algo
|
||||||
importSub->SetEventListener( get(), new _ListenerData(srcHyp), importSub );
|
importSub->SetEventListener( get(), new _ListenerData(srcHyp), importSub );
|
||||||
|
|
||||||
// set a listener to hear events of the source mesh
|
// set listeners to hear events of the source mesh
|
||||||
SMESH_subMesh* smToNotify = importSub;
|
SMESH_subMesh* smToNotify = importSub;
|
||||||
SMESH_subMesh* smToListen = srcMesh->GetSubMeshContaining(1);
|
vector<SMESH_subMesh*> smToListen = srcHyp->GetSourceSubMeshes( srcMesh );
|
||||||
SMESH_subMeshEventListenerData* data = new _ListenerData(srcHyp, LISTEN_SRC_MESH);
|
for ( size_t i = 0; i < smToListen.size(); ++i )
|
||||||
data->mySubMeshes.push_back( smToNotify );
|
{
|
||||||
importSub->SetEventListener( get(), data, smToListen );
|
SMESH_subMeshEventListenerData* data = new _ListenerData(srcHyp, LISTEN_SRC_MESH);
|
||||||
|
data->mySubMeshes.push_back( smToNotify );
|
||||||
// remeber the submesh importSub and its sub-submeshes
|
importSub->SetEventListener( get(), data, smToListen[i] );
|
||||||
|
}
|
||||||
|
// remember the submesh importSub and its sub-submeshes
|
||||||
_ImportData* iData = _Listener::getImportData( srcMesh, importSub->GetFather());
|
_ImportData* iData = _Listener::getImportData( srcMesh, importSub->GetFather());
|
||||||
iData->trackHypParams( importSub, srcHyp );
|
iData->trackHypParams( importSub, srcHyp );
|
||||||
iData->addComputed( importSub );
|
iData->addComputed( importSub );
|
||||||
@ -370,11 +372,11 @@ namespace // INTERNAL STUFF
|
|||||||
// clear the rest submeshes
|
// clear the rest submeshes
|
||||||
if ( !d->_computedSubM.empty() )
|
if ( !d->_computedSubM.empty() )
|
||||||
{
|
{
|
||||||
set< SMESH_subMesh*, _SubLess> subs;
|
d->_computedSubM.clear();
|
||||||
subs.swap( d->_computedSubM ); // avoid recursion via events
|
set< SMESH_subMesh*, _SubLess>::iterator sub = d->_subM.begin();
|
||||||
while ( !subs.empty() )
|
for ( ; sub != d->_subM.end(); ++sub )
|
||||||
{
|
{
|
||||||
SMESH_subMesh* subM = *subs.begin(); subs.erase( subs.begin() );
|
SMESH_subMesh* subM = *sub;
|
||||||
_ListenerData* hypData = (_ListenerData*) subM->GetEventListenerData( get() );
|
_ListenerData* hypData = (_ListenerData*) subM->GetEventListenerData( get() );
|
||||||
if ( hypData )
|
if ( hypData )
|
||||||
d->removeGroups( sm, hypData->_srcHyp );
|
d->removeGroups( sm, hypData->_srcHyp );
|
||||||
|
Loading…
Reference in New Issue
Block a user