Move restoring SMESH_Mesh::_isModified from SMESH_Gen_i to SMESH_PreMeshInfo
This commit is contained in:
eap 2012-09-03 08:12:37 +00:00
parent 9e81eb1e25
commit eb0c3c26e7
2 changed files with 13 additions and 13 deletions

View File

@ -4158,18 +4158,6 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
}
}
// issue 0020693. Restore _isModified flag
if( aTopGroup->ExistInternalObject( "_isModified" ) )
{
aDataset = new HDFdataset( "_isModified", aTopGroup );
aDataset->OpenOnDisk();
size = aDataset->GetSize();
int* isModified = new int[ size ];
aDataset->ReadFromDisk( isModified );
aDataset->CloseOnDisk();
myNewMeshImpl->GetImpl().SetIsModified( bool(*isModified));
}
// issue 20918. Restore Persistent Id of SMESHDS_Mesh
if( aTopGroup->ExistInternalObject( "meshPersistentId" ) )
{

View File

@ -858,7 +858,7 @@ void SMESH_PreMeshInfo::FullLoadFromFile() const
SMESH_PreMeshInfo* meshInfo = _mesh->changePreMeshInfo();
_mesh->changePreMeshInfo() = NULL; // to allow GUI accessing to real info
::SMESH_Mesh& mesh = _mesh->GetImpl();
::SMESH_Mesh& mesh = _mesh->GetImpl();
SMESHDS_Mesh* meshDS = mesh.GetMeshDS();
PreMeshInfo_TRY;
@ -919,6 +919,18 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
SMESHDS_Mesh* meshDS = _mesh->GetImpl().GetMeshDS();
// issue 0020693. Restore _isModified flag
if ( aTopGroup->ExistInternalObject( "_isModified" ))
{
HDFdataset* aDataset = new HDFdataset( "_isModified", aTopGroup );
aDataset->OpenOnDisk();
hdf_size size = aDataset->GetSize();
int* isModified = new int[ size ];
aDataset->ReadFromDisk( isModified );
aDataset->CloseOnDisk();
_mesh->GetImpl().SetIsModified( bool(*isModified));
}
bool submeshesInFamilies = ( ! aTopGroup->ExistInternalObject( "Submeshes" ));
if ( submeshesInFamilies ) // from MED
{