X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2FGeometryComponent.java;h=a25bd4ef63523e11f27a85a7f3b8cd7b5583899a;hb=a3d63f1ba39c56c2b0236932965b9712654fad12;hp=0e53c1b6402860f002ef301b8b0ccadd706392c5;hpb=10e661e9b5bf90e754626811976e1014f8a0b2c8;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..a25bd4ef 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; @@ -254,6 +258,7 @@ public class GeometryComponent { if (hover) color = new double[]{1,0,1}; for (vtkProp3D prop : solidObject.getEdges()) { + prop.SetVisibility(hover ? 1 : 0); vtkProperty property = ((vtkActor)prop).GetProperty(); property.SetColor(color); property.Delete();