Salome HOME
021346: EDF 1938 SMESH: "Use existing elements" functionality
authoreap <eap@opencascade.com>
Mon, 22 Aug 2011 08:43:48 +0000 (08:43 +0000)
committereap <eap@opencascade.com>
Mon, 22 Aug 2011 08:43:48 +0000 (08:43 +0000)
   In Load(), call hyp->UpdateAsMeshesRestored() before submesh->ComputeStateEngine(SUBMESH_RESTORED)

src/SMESH_I/SMESH_Gen_i.cxx

index 098944e74d587d0f62a220b1ad56b3d8cf8a1e4d..cb00ff41add2a60084f2c9c9e08dc7b276bdbca4 100644 (file)
@@ -4671,6 +4671,13 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
       }
     } // loop on meshes
 
+    // update hyps needing full mesh data restored (issue 20918)
+    for ( hyp_data = hypDataList.begin(); hyp_data != hypDataList.end(); ++hyp_data )
+    {
+      SMESH_Hypothesis_i* hyp  = hyp_data->first;
+      hyp->UpdateAsMeshesRestored();
+    }
+
     // notify algos on completed restoration
     for ( meshi_group = meshGroupList.begin(); meshi_group != meshGroupList.end(); ++meshi_group )
     {
@@ -4687,12 +4694,6 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
         ComputeStateEngine (SMESH_subMesh::SUBMESH_RESTORED);
     }
 
-    for ( hyp_data = hypDataList.begin(); hyp_data != hypDataList.end(); ++hyp_data )
-    {
-      SMESH_Hypothesis_i* hyp  = hyp_data->first;
-      hyp->UpdateAsMeshesRestored(); // for hyps needing full mesh data restored (issue 20918)
-    }
-
     // close mesh group
     if(aTopGroup)
       aTopGroup->CloseOnDisk();