Ticket #8610: fixAreaText.patch
File fixAreaText.patch, 855 bytes (added by , 12 years ago) |
---|
-
src/org/openstreetmap/josm/gui/NavigatableComponent.java
1277 1277 */ 1278 1278 public String getAreaText(double area) { 1279 1279 double a = area / (aValue*aValue); 1280 if (!Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false) && a > bValue / aValue) {1280 if (!Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false) && a > bValue*bValue / aValue*aValue ) { 1281 1281 double b = area / (bValue*bValue); 1282 1282 return String.format(Locale.US, "%." + (b<10 ? 2 : 1) + "f %s", b, bName+"\u00b2"); 1283 1283 } else if (a < 0.01)