Salome HOME
Minor doc changes
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index 5bb8a34b38ee33a051faa7636d8ab1e23c0c4c52..128316dcf55c87817dbf3e556cb61bf02a660d35 100644 (file)
@@ -2079,10 +2079,10 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
     const TopoDS_Shape&  S = subMesh->_subShape;
     if ( S.ShapeType() != this->_subShape.ShapeType() )
       continue;
-    theSubs.push_back( subMesh );
     if ( subMesh == this )
     {
       aBuilder.Add( aCompound, S );
+      theSubs.push_back( subMesh );
     }
     else if ( subMesh->GetComputeState() == READY_TO_COMPUTE )
     {
@@ -2093,6 +2093,7 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
         aBuilder.Add( aCompound, S );
         if ( !subMesh->SubMeshesComputed() )
           theSubComputed = false;
+        theSubs.push_back( subMesh );
       }
     }
   }