Fixed set value casting decimal numbers to integer

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@50 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-07-01 16:12:53 +00:00
parent 6384609fce
commit 5fa6d71e7f
1 changed files with 5 additions and 1 deletions

View File

@ -206,9 +206,13 @@ 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());
if (table.getStorageType() == Table.STORAGE_TYPE_FLOAT) {
this.setBinValue(parser.getValue());
} else {
this.setBinValue((int)Math.round(parser.getValue()));
}
}
}
public Color getHighlightColor() {
return highlightColor;