]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/EllipticCylinderNode.java
Remove listener calls when property values not updated.
[simantics/3d.git] / org.simantics.g3d.csg / src / org / simantics / g3d / csg / scenegraph2 / EllipticCylinderNode.java
index 5abecc2b385d2b54ff3c89a2947ebaaf809775d3..e4030728621fa0b7b5613e4b2b709614f4e7b0d9 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************\r
+ * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.g3d.csg.scenegraph2;\r
 \r
 import org.jcae.opencascade.jni.TopoDS_Shape;\r
@@ -19,6 +30,8 @@ public class EllipticCylinderNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasMinorRadius)\r
        @SetPropertyValue(CSG.URIs.HasMinorRadius)\r
        public void setR1(double r1) {\r
+               if (this.r1 == r1)\r
+                       return;\r
                this.r1 = r1;\r
                firePropertyChanged(CSG.URIs.HasMinorRadius);\r
        }\r
@@ -26,6 +39,8 @@ public class EllipticCylinderNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasMajorRadius)\r
        @SetPropertyValue(CSG.URIs.HasMajorRadius)\r
        public void setR2(double r2) {\r
+               if (this.r2 == r2)\r
+                       return;\r
                this.r2 = r2;\r
                firePropertyChanged(CSG.URIs.HasMajorRadius);\r
        }\r
@@ -33,6 +48,8 @@ public class EllipticCylinderNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasHeight)\r
        @SetPropertyValue(CSG.URIs.HasHeight)\r
        public void setH(double h) {\r
+               if (this.h == h)\r
+                       return;\r
                this.h = h;\r
                firePropertyChanged(CSG.URIs.HasHeight);\r
        }\r