From fb68cb5a3d9573a3f50b3870a9797cf494afdb32 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 24 Oct 2011 11:56:13 +0000 Subject: [PATCH] 0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups Pass the mesh of filter to predicate at setting a mesh and a predicate to avoid dump of predicate commands when a group is created from GUI --- src/SMESH_I/SMESH_Filter_i.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 1728f7dee..0a7d4d67e 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -2294,6 +2294,8 @@ void Filter_i::SetPredicate( Predicate_ptr thePredicate ) { myFilter.SetPredicate( myPredicate->GetPredicate() ); myPredicate->Register(); + if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh)) + myPredicate->GetPredicate()->SetMesh( aMesh ); TPythonDump()<::iterator i = myWaiters.begin(); @@ -2326,6 +2328,10 @@ SetMesh( SMESH_Mesh_ptr theMesh ) myMesh = SMESH_Mesh::_duplicate( theMesh ); TPythonDump()<GetPredicate()->SetMesh( aMesh ); } SMESH::long_array* @@ -3100,6 +3106,8 @@ Predicate_ptr Filter_i::GetPredicate() else { SMESH::Predicate_var anObj = myPredicate->_this(); + // if ( SMESH::Functor_i* fun = SMESH::DownCast( anObj )) + // TPythonDump() << fun << " = " << this << ".GetPredicate()"; return anObj._retn(); } } -- 2.39.2