Salome HOME
Merge remote-tracking branch 'origin/rnv/vtk_opengl2_backend' into V8_1_BR
[modules/paravis.git] / src / Plugins / MEDReader / IO / vtkMEDReader.cxx
index 7c4b308cb9e3f0ba9c631f19c7a089d6352284db..92ecc7d4ce7f8366d216db49fca3e474ddd5cfd6 100644 (file)
@@ -206,7 +206,7 @@ vtkInformationDataObjectMetaDataKey *vtkMEDReader::META_DATA()
 {
   static const char ZE_KEY[]="vtkMEDReader::META_DATA";
   vtkInformationDataObjectMetaDataKey *ret(vtkMEDReader_META_DATA);
-  ParaMEDMEM::GlobalDict *gd(ParaMEDMEM::GlobalDict::GetInstance());
+  MEDCoupling::GlobalDict *gd(MEDCoupling::GlobalDict::GetInstance());
   if(!gd->hasKey(ZE_KEY))
     {// here META_DATA is put on global var to be exchanged with other filters without dependancy of MEDReader. Please do not change ZE_KEY !
       std::ostringstream oss; oss << ret;
@@ -509,21 +509,16 @@ void vtkMEDReader::UpdateSIL(vtkInformation* request, vtkInformation *info)
 {
   if(!this->Internal)
       return;
-  vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::New());
-
-  // This Should be more clever, TODO
-  std::string meshName(this->BuildSIL(sil));
-  if(meshName!=this->Internal->DftMeshName)
+  std::string meshName(this->Internal->Tree.getActiveMeshName());
+  if(!this->Internal->SIL || meshName!=this->Internal->DftMeshName)
     {
+      vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::New());
+      this->BuildSIL(sil);
       if(this->Internal->SIL)
         this->Internal->SIL->Delete();
       this->Internal->SIL=sil;
       this->Internal->DftMeshName=meshName;
     }
-  else
-    {
-      sil->Delete();
-    }
 }
 
 /*!