From 5fa6d71e7fb81b02eeafafff3cf89148aec04e46 Mon Sep 17 00:00:00 2001 From: Jared Gould Date: Sat, 1 Jul 2006 16:12:53 +0000 Subject: [PATCH] Fixed set value casting decimal numbers to integer git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@50 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d --- src/enginuity/maps/DataCell.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/enginuity/maps/DataCell.java b/src/enginuity/maps/DataCell.java index 2dbbc48e..071320de 100644 --- a/src/enginuity/maps/DataCell.java +++ b/src/enginuity/maps/DataCell.java @@ -206,7 +206,11 @@ public class DataCell extends JLabel implements MouseListener, Serializable { parser.initSymTab(); // clear the contents of the symbol table parser.addVariable("x", Double.parseDouble(input)); parser.parseExpression(table.getScale().getByteExpression()); - this.setBinValue((int)Math.round(parser.getValue())); + if (table.getStorageType() == Table.STORAGE_TYPE_FLOAT) { + this.setBinValue(parser.getValue()); + } else { + this.setBinValue((int)Math.round(parser.getValue())); + } } }