Salome HOME
[EDF19861] : Copy components names in the output array.
[modules/paravis.git] / src / Plugins / DifferenceTimesteps / vtkDifferenceTimestepsFilter.cxx
index 9a2baa03f49f16d0c5f738fd7e39eb98a53c02cc..f1e8a18cb979398b20182e6121cafb48da5bad93 100644 (file)
@@ -77,6 +77,11 @@ void vtkTemporalDataDifference(
       *anOutputData++ = static_cast<T>(x1[c]-x0[c]);
     }
   }
+  // Copy component name
+  for (int c = 0; c < theNumComp; ++c)
+  {
+    theOutput->SetComponentName(c,theArrays[0]->GetComponentName(c));
+  }
   theOutput->SetNumberOfTuples(N);
 }