X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d.csg%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fcsg%2Fscenegraph2%2FCylinderNode.java;h=cf2e0183269c280c39b1a452547985d24c578ca0;hb=refs%2Fchanges%2F08%2F3908%2F2;hp=d4a3f704d2add982080405290b20183fba024daa;hpb=87b3241ec277ba3d8e414b26186a032c9cdcaeed;p=simantics%2F3d.git diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CylinderNode.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CylinderNode.java index d4a3f704..cf2e0183 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CylinderNode.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CylinderNode.java @@ -1,5 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.g3d.csg.scenegraph2; +import java.util.Objects; + import org.jcae.opencascade.jni.TopoDS_Shape; import org.simantics.g3d.csg.ontology.CSG; import org.simantics.g3d.property.annotations.GetPropertyValue; @@ -18,6 +31,8 @@ public class CylinderNode extends CSGnode { @RelatedSetValue(CSG.URIs.HasRadius) @SetPropertyValue(CSG.URIs.HasRadius) public void setR(double r) { + if (this.r == r) + return; this.r = r; firePropertyChanged(CSG.URIs.HasRadius); } @@ -25,6 +40,8 @@ public class CylinderNode extends CSGnode { @RelatedSetValue(CSG.URIs.HasHeight) @SetPropertyValue(CSG.URIs.HasHeight) public void setH(double h) { + if (this.h == h) + return; this.h = h; firePropertyChanged(CSG.URIs.HasHeight); }