]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/BoxNode.java
Remove listener calls when property values not updated.
[simantics/3d.git] / org.simantics.g3d.csg / src / org / simantics / g3d / csg / scenegraph2 / BoxNode.java
index b15813719b1aac6dbb89dcf8b7f00779f11411f4..ea950eeb80ca68181ee87099d5732d41b45098e0 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
@@ -23,6 +34,8 @@ public class BoxNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasXAxisSize)\r
        @SetPropertyValue(CSG.URIs.HasXAxisSize)\r
        public void setSX(double d) {\r
+               if (this.sx == d)\r
+                       return;\r
                this.sx = d;\r
                firePropertyChanged(CSG.URIs.HasXAxisSize);\r
        }\r
@@ -30,6 +43,8 @@ public class BoxNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasYAxisSize)\r
        @SetPropertyValue(CSG.URIs.HasYAxisSize)\r
        public void setSY(double d) {\r
+               if (this.sy == d)\r
+                       return;\r
                this.sy = d;\r
                firePropertyChanged(CSG.URIs.HasYAxisSize);\r
        }\r
@@ -37,6 +52,8 @@ public class BoxNode extends CSGnode {
        @RelatedSetValue(CSG.URIs.HasZAxisSize)\r
        @SetPropertyValue(CSG.URIs.HasZAxisSize)\r
        public void setSZ(double d) {\r
+               if (this.sz == d)\r
+                       return;\r
                this.sz = d;\r
                firePropertyChanged(CSG.URIs.HasZAxisSize);\r
        }\r