Salome HOME
simplification involved by medfile 4.1
[modules/smesh.git] / src / SMESH_I / SMESH_PreMeshInfo.cxx
index 423428e551b84d9f59f91dabc983b633516edc20..275acb0430aaf220fc1791cf56a1e0af42b2e892 100644 (file)
@@ -456,6 +456,7 @@ bool SMESH_PreMeshInfo::readPreInfoFromHDF()
                                                mapOfNames );
       }
     }
+    infoHdfGroup->CloseOnDisk();
   }
 
   aFile->CloseOnDisk();
@@ -478,7 +479,7 @@ bool SMESH_PreMeshInfo::readMeshInfo()
   MED::PMeshInfo medMeshInfo = aMed->CrMeshInfo(3,3,SMESH_Comment( _meshID ));
 
   // read nb nodes
-  int nbNodes = std::max( 0, aMed->GetNbNodes( medMeshInfo ));
+  int nbNodes = Max( 0, aMed->GetNbNodes( medMeshInfo ));
   if ( nbNodes > 0 )
   {
     setNb( SMDSEntity_Node, nbNodes);
@@ -840,8 +841,9 @@ void SMESH_PreMeshInfo::FullLoadFromFile() const
   meshDS->Modified();
 
   // load dependent meshes referring/referred via hypotheses
-  mesh.GetSubMesh( mesh.GetShapeToMesh() )->
-    ComputeStateEngine (SMESH_subMesh::SUBMESH_LOADED);
+  SMESH_subMesh* mainSub = mesh.GetSubMesh( mesh.GetShapeToMesh() );
+  mainSub->ComputeStateEngine (SMESH_subMesh::SUBMESH_RESTORED); // #16648 
+  mainSub->ComputeStateEngine (SMESH_subMesh::SUBMESH_LOADED);
 
   MYDEBUGOUT( "END FullLoadFromFile()" );
 }