Salome HOME
Compute Progress bar: ignore sub-meshes that are NOT_READY to compute
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index a78efcdfca195cc80e6b9b60df106719fac02af6..7b7fc75b9249fb05df5605905086d243a36776e1 100644 (file)
@@ -2089,7 +2089,8 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
   {
     const TopoDS_Shape& S = anExplorer.Current();
     SMESH_subMesh* subMesh = _father->GetSubMesh( S );
-    theComputeCost += subMesh->GetComputeCost();
+    if ( subMesh->GetComputeState() != NOT_READY )
+      theComputeCost += subMesh->GetComputeCost();
     if ( subMesh == this )
     {
       aBuilder.Add( aCompound, S );
@@ -2109,7 +2110,8 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
       while ( smIt->more() )
       {
         SMESH_subMesh* sm = smIt->next();
-        if ( sm->IsEmpty() )
+        if ( sm->GetComputeState() != NOT_READY &&
+             sm->IsEmpty() )
           theComputeCost += sm->GetComputeCost();
       }
     }