Salome HOME
PAL21729 TC5.1.4: Problem with saving study after "Convert to quadratic" operation
[modules/smesh.git] / src / SMESHDS / SMESHDS_SubMesh.cxx
index 6d9ba0835e7fc45436da07e501760a4b2acbe1ee..92704eb37654f030adc9efa828bb642e797a836e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESH_SubMesh.cxx
 //  Author : Yves FRICAUD, OCC
@@ -141,9 +142,9 @@ template<class ELEM, typename TSET> class MySetIterator:
 {
   typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather;
   public:
-       MySetIterator(const TSET& s):TFather(s.begin(),s.end())
-       {
-       }
+        MySetIterator(const TSET& s):TFather(s.begin(),s.end())
+        {
+        }
 };
 
 // =====================
@@ -243,17 +244,18 @@ SMDS_NodeIteratorPtr SMESHDS_SubMesh::GetNodes() const
 bool SMESHDS_SubMesh::Contains(const SMDS_MeshElement * ME) const
 {
   // DO NOT TRY TO FIND A REMOVED ELEMENT !!
-  if ( IsComplexSubmesh() || !ME )
+  //if ( IsComplexSubmesh() || !ME )
+  if (!ME )
     return false;
 
-//   if ( IsComplexSubmesh() )
-//   {
-//     set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
-//     for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
-//       if ( (*aSubIt)->Contains( ME ))
-//         return true;
-//     return false;
-//   }
+  if ( IsComplexSubmesh() )
+  {
+    set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
+    for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
+      if ( (*aSubIt)->Contains( ME ))
+        return true;
+    return false;
+  }
 
   if ( ME->GetType() == SMDSAbs_Node )
     return ( myNodes.find( ME ) != myNodes.end() );