X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2FGeometryComponent.java;h=c784b4113f8ebd650f878245a8c9dd45ebd8ebb8;hb=refs%2Fchanges%2F08%2F3908%2F2;hp=0e53c1b6402860f002ef301b8b0ccadd706392c5;hpb=34c84195e058b46afe68590eaf751b12bc74c1fe;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java index 0e53c1b6..c784b411 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/GeometryComponent.java @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.jcae.opencascade.jni.TopoDS_Shape; @@ -133,8 +134,11 @@ public class GeometryComponent { for (String id : parameters.keySet()) { Object currentValue = currentParameters.get(id); Object newValue = parameters.get(id); - if (currentValue == newValue) + if (Objects.equals(currentValue, newValue)) continue; + if (newValue == null) { + continue; + } if (currentValue instanceof Double) { if (Math.abs((Double)currentValue-(Double)newValue) < MathTools.NEAR_ZERO) continue;