Solve the problem that integers are printed as floats as far as skin parameters and
macro return values are concerned.
This commit is contained in:
parent
bc1b067cf0
commit
3d3b839395
1 changed files with 13 additions and 1 deletions
|
@ -611,7 +611,19 @@ public final class Skin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text = value.toString();
|
// do not render doubles as doubles unless
|
||||||
|
// they actually have a decimal place. This is necessary because
|
||||||
|
// all numbers are handled as Double in JavaScript.
|
||||||
|
if (value instanceof Double) {
|
||||||
|
Double d = (Double) value;
|
||||||
|
if (d.longValue() == d.doubleValue()) {
|
||||||
|
text = Long.toString(d.longValue());
|
||||||
|
} else {
|
||||||
|
text = d.toString();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
text = value.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((text != null) && (text.length() > 0)) {
|
if ((text != null) && (text.length() > 0)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue