From: eap Date: Thu, 13 May 2010 06:22:26 +0000 (+0000) Subject: 0020693: EDF 1288 SMESH: Problem to recompute a mesh with a sub-mesh and a conversion... X-Git-Tag: translate_resources_09Jul10~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fdac3f59c5ff164712c8cce699542d16ae21f073;p=modules%2Fsmesh.git 0020693: EDF 1288 SMESH: Problem to recompute a mesh with a sub-mesh and a conversion linear-quadratic * save/restore _isModified attribute of the mesh --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 9e9b90e4b..49ec45fad 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -2518,6 +2518,14 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aDataset->WriteOnDisk( anAutoColor ); aDataset->CloseOnDisk(); + // issue 0020693. Store _isModified flag + int isModified = myImpl->GetImpl().GetIsModified(); + aSize[ 0 ] = 1; + aDataset = new HDFdataset( "_isModified", aTopGroup, HDF_INT32, aSize, 1 ); + aDataset->CreateOnDisk(); + aDataset->WriteOnDisk( &isModified ); + aDataset->CloseOnDisk(); + // write reference on a shape if exists SALOMEDS::SObject_var myRef; bool shapeRefFound = false; @@ -3608,6 +3616,18 @@ 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)); + } } } }