From 305be39d052f378b46a71426347de1c3dd343eb9 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 13 Mar 2017 08:24:33 +0100
Subject: [PATCH] [insitu] Fixed number of array components.

Clarified save-parameter usage in vtkAOSDataArrayTemplate::setArray().
---
 MeshLib/Vtk/VtkMappedMeshSource.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MeshLib/Vtk/VtkMappedMeshSource.h b/MeshLib/Vtk/VtkMappedMeshSource.h
index 030150a51d8..962a064f041 100644
--- a/MeshLib/Vtk/VtkMappedMeshSource.h
+++ b/MeshLib/Vtk/VtkMappedMeshSource.h
@@ -86,8 +86,11 @@ private:
             return false;
 
         vtkNew<vtkAOSDataArrayTemplate<T> > dataArray;
+        const bool hasArrayOwnership = false;
         dataArray->SetArray(propertyVector->data(),
-            static_cast<vtkIdType>(propertyVector->size()), 1);
+            static_cast<vtkIdType>(propertyVector->size()),
+            static_cast<int>(!hasArrayOwnership));
+        dataArray->SetNumberOfComponents(propertyVector->getNumberOfComponents());
         dataArray->SetName(prop_name.c_str());
 
         if(propertyVector->getMeshItemType() == MeshLib::MeshItemType::Node)
-- 
GitLab