From e8a8a0d57bd1d90e3b8679f30bb0edf1351c91db Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 24 Mar 2016 06:33:59 +0100
Subject: [PATCH] [A/U/ME] Resets properties inside instead outside.

---
 .../Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp
index be99d66a891..cf3b58ae28e 100644
--- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp
+++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp
@@ -95,6 +95,7 @@ void resetMeshElementProperty(MeshLib::Mesh &mesh, GeoLib::Polygon const& polygo
 			property_name.c_str());
 		return;
 	}
+
 	MeshLib::PropertyVector<PT> & pv(opt_pv.get());
 	if (pv.getMeshItemType() != MeshLib::MeshItemType::Cell) {
 		ERR("Values of the PropertyVector are not assigned to cells.");
@@ -114,7 +115,7 @@ void resetMeshElementProperty(MeshLib::Mesh &mesh, GeoLib::Polygon const& polygo
 				elem_out = false;
 			}
 		}
-		if (elem_out) {
+		if (!elem_out) {
 			pv[j] = new_property_value;
 		}
 	}
-- 
GitLab