Salome HOME
progress bar: fix for viscous layers
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index bcddd46d52d707b398cf7b48fa5eaee7da38a1de..4ae04c64775e0d12dd4e132d5caf3a1169682bb5 100644 (file)
@@ -1486,12 +1486,16 @@ double SMESH_Mesh::GetComputeProgress() const
         currentSubIds.Add( smToCompute[i]->GetId() );
       }
       double rate = algo->GetProgress();
-      if ( !( 0. < rate && rate < 1.001 ))
+      if ( 0. < rate && rate < 1.001 )
+      {
+        computedCost += rate * ( algoDoneCost + algoNotDoneCost );
+      }
+      else
       {
         rate = algo->GetProgressByTic();
+        computedCost += algoDoneCost + rate * algoNotDoneCost;
       }
       // cout << "rate: "<<rate << " algoNotDoneCost: " << algoNotDoneCost << endl;
-      computedCost += algoDoneCost + rate * algoNotDoneCost;
     }
 
   // get cost of already treated sub-meshes