*******************************************************************************/
package org.simantics.g3d.property;
+import org.simantics.g3d.math.MathTools;
+
public class DoublePropertyManipulator implements PropertyManipulator {
ValueProvider provider;
if (editMode)
return editValue;
try {
- return provider.getValue(input).toString();
+ Object value = provider.getValue(input);
+ if (value == null) return null;
+ if (value instanceof Double)
+ return Double.toString(MathTools.round((Double)value, 10));
+ return value.toString();
} catch (Exception e) {
return null;
}
editMode = b;
if (editMode) {
try {
- editValue = provider.getValue(input).toString();
+ Object value = provider.getValue(input);
+ editValue = value.toString();
} catch (Exception e) {
}