]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Salome Forum http://www.salome-platform.org/forum/forum_10/350978231
authoreap <eap@opencascade.com>
Mon, 3 Sep 2012 08:12:37 +0000 (08:12 +0000)
committereap <eap@opencascade.com>
Mon, 3 Sep 2012 08:12:37 +0000 (08:12 +0000)
Move restoring SMESH_Mesh::_isModified from SMESH_Gen_i to SMESH_PreMeshInfo

src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_PreMeshInfo.cxx

index 24b30bb62e2c5013e60b976dd36db43ebd79da1c..87c47de8faa1b22a98083b7348e338dc11a7bb94 100644 (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" ) )
           {
index e56adfadf43b4e3f9971d8dadf19f8720a7946de..0a3d58614a4a37e466e9c35517af8492cc6d9f0b 100644 (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
     {