From afe82275f9905ae2161ce4704a2e2f6fec339f36 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Mon, 12 Nov 2018 10:30:55 +0100
Subject: [PATCH] [A/U/MeshEdit] Use new {exists,get}PropertyVector.

This versions check if the PropertyVector is
assigned to the requested mesh item type and has
the required number of components.
---
 Applications/Utils/MeshEdit/queryMesh.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Applications/Utils/MeshEdit/queryMesh.cpp b/Applications/Utils/MeshEdit/queryMesh.cpp
index f40fcf3ca50..44bd0156e2a 100644
--- a/Applications/Utils/MeshEdit/queryMesh.cpp
+++ b/Applications/Utils/MeshEdit/queryMesh.cpp
@@ -68,9 +68,11 @@ int main(int argc, char *argv[])
     }
     selected_node_ids.insert(selected_node_ids.end(), nodeId_arg.getValue().begin(), nodeId_arg.getValue().end());
 
-    MeshLib::PropertyVector<int> const*const materialIds =
-        mesh->getProperties().existsPropertyVector<int>("MaterialIDs")
-            ? mesh->getProperties().getPropertyVector<int>("MaterialIDs")
+    MeshLib::PropertyVector<int> const* const materialIds =
+        mesh->getProperties().existsPropertyVector<int>(
+            "MaterialIDs", MeshLib::MeshItemType::Cell, 1)
+            ? mesh->getProperties().getPropertyVector<int>(
+                  "MaterialIDs", MeshLib::MeshItemType::Cell, 1)
             : nullptr;
     for (auto ele_id : eleId_arg.getValue())
     {
-- 
GitLab