Fix table compare error for tables with storagetype=float.

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@210 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
lizzardo 2009-01-02 01:41:14 +00:00
parent 802c11d9e8
commit 84b9ebadf5
1 changed files with 5 additions and 4 deletions

View File

@ -277,13 +277,10 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
// create parser
if (!"x".equalsIgnoreCase(input)) {
double result = JEPUtil.evaluate(table.getScale().getByteExpression(), Double.parseDouble(input));
if (table.getStorageType() == Table.STORAGE_TYPE_FLOAT) {
this.setBinValue(result);
} else {
this.setBinValue((int) Math.round(result));
}
}
}
@ -334,7 +331,11 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
public void setCompareRealValue(String input) {
double result = JEPUtil.evaluate(table.getScale().getByteExpression(), Double.parseDouble(input));
this.setCompareValue((int) Math.round(result));
if (table.getStorageType() == Table.STORAGE_TYPE_FLOAT) {
this.setCompareValue(result);
} else {
this.setCompareValue((int) Math.round(result));
}
}
public void setCompareDisplay(int compareDisplay) {