From: eap Date: Mon, 3 Sep 2012 08:12:37 +0000 (+0000) Subject: Salome Forum http://www.salome-platform.org/forum/forum_10/350978231 X-Git-Tag: V6_6_0a1~152 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb0c3c26e7cc2c80737060ba82f67148263cdd93;p=modules%2Fsmesh.git Salome Forum http://www.salome-platform.org/forum/forum_10/350978231 Move restoring SMESH_Mesh::_isModified from SMESH_Gen_i to SMESH_PreMeshInfo --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 24b30bb62..87c47de8f 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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" ) ) { diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index e56adfadf..0a3d58614 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -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 {