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 58944ecf62c156ee6fff3e08eb7c396fdb0d5a97..92ecc7d4ce7f8366d216db49fca3e474ddd5cfd6 100644 (file)
@@ -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();
-    }
 }
 
 /*!