Ticket #8610: 8610.patch
File 8610.patch, 1.7 KB (added by , 12 years ago) |
---|
-
src/org/openstreetmap/josm/gui/NavigatableComponent.java
1315 1315 public String getAreaText(double area) { 1316 1316 double a = area / (aValue*aValue); 1317 1317 boolean lowerOnly = Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false); 1318 if (!lowerOnly && areaCustomValue > 0 && a > areaCustomValue / aValue*aValue && a < bValue*bValue / aValue*aValue) 1318 boolean customAreaOnly = Main.pref.getBoolean("system_of_measurement.use_only_custom_area_unit", false); 1319 if ((!lowerOnly && areaCustomValue > 0 && a > areaCustomValue / (aValue*aValue) && a < bValue*bValue / (aValue*aValue)) || customAreaOnly) 1319 1320 return formatText(area / areaCustomValue, areaCustomName); 1320 else if (!lowerOnly && a >= bValue*bValue / aValue*aValue)1321 else if (!lowerOnly && a >= bValue*bValue / (aValue*aValue)) 1321 1322 return formatText(area / (bValue*bValue), bName+"\u00b2"); 1322 1323 else if (a < 0.01) 1323 1324 return "< 0.01 " + aName+"\u00b2"; … … 1346 1347 * Imperial system (British Commonwealth and former British Empire). 1347 1348 * @since 3406 1348 1349 */ 1349 public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi" );1350 public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi", 4046.86, "ac"); 1350 1351 1351 1352 /** 1352 1353 * Nautical mile system (navigation, polar exploration).