Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/smesh
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index d1d80774140a60474b92ab33940ac33bc5f7c498..8258f4ceaafb05e4733b18bd27fac91e0ed5dd7c 100644 (file)
@@ -1947,6 +1947,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
       bool ok = myGen.Compute( myLocMesh, myLocShape, how );
       meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
       myLocMesh.GetMeshDS()->Modified();
+      UpdateIcons( theMesh );
       return ok;
     }
   }
@@ -2958,7 +2959,7 @@ char* SMESH_Gen_i::GetMEDVersion(const char* theFileName)
 /*!
  *  SMESH_Gen_i::CheckCompatibility
  *
- *  Check compatibility of file with MED format being used.
+ *  Check compatibility of file with MED format being used, read only.
  */
 //================================================================================
 CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
@@ -2966,6 +2967,18 @@ CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
   return MED::CheckCompatibility( theFileName );
 }
 
+//================================================================================
+/*!
+ *  SMESH_Gen_i::CheckWriteCompatibility
+ *
+ *  Check compatibility of file with MED format being used, for append on write.
+ */
+//================================================================================
+CORBA::Boolean SMESH_Gen_i::CheckWriteCompatibility(const char* theFileName)
+{
+  return MED::CheckCompatibility( theFileName, true );
+}
+
 //================================================================================
 /*!
  *  SMESH_Gen_i::GetMeshNames
@@ -2975,10 +2988,12 @@ CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
 //================================================================================
 SMESH::string_array* SMESH_Gen_i::GetMeshNames(const char* theFileName)
 {
+  //MESSAGE("GetMeshNames " << theFileName);
   SMESH::string_array_var aResult = new SMESH::string_array();
   MED::PWrapper aMed = MED::CrWrapperR( theFileName );
   MED::TErr anErr;
   MED::TInt aNbMeshes = aMed->GetNbMeshes( &anErr );
+  //MESSAGE("---" << aNbMeshes);
   if( anErr >= 0 ) {
     aResult->length( aNbMeshes );
     for( MED::TInt i = 0; i < aNbMeshes; i++ ) {
@@ -4001,7 +4016,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                         const char*              theURL,
                         bool                     isMultiFile )
 {
-  if (!myStudyContext)
+  //if (!myStudyContext)
     UpdateStudy();
   SALOMEDS::Study_var aStudy = getStudyServant();
   /*  if( !theComponent->_is_nil() )