]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH/SMESH_Mesh.cxx
Salome HOME
0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index 8e22cc24d5bb57a5fa24763be100d3161fe080be..2a9b64909709ec0fea40f72aedbed524494ba309 100644 (file)
@@ -1420,12 +1420,13 @@ bool SMESH_Mesh::IsMainShape(const TopoDS_Shape& theShape) const
 SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
                                    const char*               theName,
                                    int&                      theId,
-                                   const TopoDS_Shape&       theShape)
+                                   const TopoDS_Shape&       theShape,
+                                   const SMESH_PredicatePtr& thePredicate)
 {
-  if (_mapGroup.find(_groupId) != _mapGroup.end())
+  if (_mapGroup.count(_groupId))
     return NULL;
   theId = _groupId;
-  SMESH_Group* aGroup = new SMESH_Group (theId, this, theType, theName, theShape);
+  SMESH_Group* aGroup = new SMESH_Group (theId, this, theType, theName, theShape, thePredicate);
   GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
   _mapGroup[_groupId++] = aGroup;
   return aGroup;