]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/property/DoubleArrayPropertyManipulator2.java
Eliminate rounding errors in property tabs.
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / property / DoubleArrayPropertyManipulator2.java
index 6b7a2e115dbe833632888cc85024a4a2edd22ee0..9275bfead2e9dbdfc63bf1dc196472eeb1fbaf1f 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.simantics.g3d.property;
 
+import org.simantics.g3d.math.MathTools;
+
 public class DoubleArrayPropertyManipulator2 implements PropertyManipulator {
        
        ValueProvider provider;
@@ -57,7 +59,7 @@ public class DoubleArrayPropertyManipulator2 implements PropertyManipulator {
                        return "New";
             if (val.length < i)
                 return null;
-            return Double.toString(val[i]);
+            return Double.toString(MathTools.round(val[i], 10));
                } catch (Exception e) {
                        return null;
                }