]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/RectangularSolidNode.java
Remove listener calls when property values not updated.
[simantics/3d.git] / org.simantics.g3d.csg / src / org / simantics / g3d / csg / scenegraph2 / RectangularSolidNode.java
index 6fb7f105c9abf9618ee655fe9258012be36f3f5a..01aaf2cddd5d5880b688cda4d345971239fdf770 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.BRepBuilderAPI_MakeEdge;\r
@@ -27,6 +38,8 @@ public class RectangularSolidNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasXAxisMinimumSize)\r
        @SetPropertyValue(CSG.URIs.HasXAxisMinimumSize)\r
        public void setX1(double d) {\r
+               if (this.x1 == d)\r
+                       return;\r
                this.x1 = d;\r
                firePropertyChanged(CSG.URIs.HasXAxisMinimumSize);\r
        }\r
@@ -34,6 +47,8 @@ public class RectangularSolidNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasXAxisMaximumSize)\r
        @SetPropertyValue(CSG.URIs.HasXAxisMaximumSize)\r
        public void setX2(double d) {\r
+               if (this.x2 == d)\r
+                       return;\r
                this.x2 = d;\r
                firePropertyChanged(CSG.URIs.HasXAxisMaximumSize);\r
        }\r
@@ -41,6 +56,8 @@ public class RectangularSolidNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasYAxisSize)\r
        @SetPropertyValue(CSG.URIs.HasYAxisSize)\r
        public void setSY(double d) {\r
+               if (this.y == d)\r
+                       return;\r
                this.y = d;\r
                firePropertyChanged(CSG.URIs.HasYAxisSize);\r
        }\r
@@ -48,6 +65,8 @@ public class RectangularSolidNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasZAxisMinimumSize)\r
        @SetPropertyValue(CSG.URIs.HasZAxisMinimumSize)\r
        public void setZ1(double d) {\r
+               if (this.z1 == d)\r
+                       return;\r
                this.z1 = d;\r
                firePropertyChanged(CSG.URIs.HasZAxisMinimumSize);\r
        }\r
@@ -55,6 +74,8 @@ public class RectangularSolidNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasZAxisMaximumSize)\r
        @SetPropertyValue(CSG.URIs.HasZAxisMaximumSize)\r
        public void setZ2(double d) {\r
+               if (this.z2 == d)\r
+                       return;\r
                this.z2 = d;\r
                firePropertyChanged(CSG.URIs.HasZAxisMaximumSize);\r
        }\r