Ticket #8610: 8610.patch

File 8610.patch, 1.7 KB (added by Preferred, 12 years ago)

Version 2 cleaning up whitespace and adding 1 change

  • src/org/openstreetmap/josm/gui/NavigatableComponent.java

     
    13151315        public String getAreaText(double area) {
    13161316            double a = area / (aValue*aValue);
    13171317            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)
    13191320                return formatText(area / areaCustomValue, areaCustomName);
    1320             else if (!lowerOnly && a >= bValue*bValue / aValue*aValue)
     1321            else if (!lowerOnly && a >= bValue*bValue / (aValue*aValue))
    13211322                return formatText(area / (bValue*bValue), bName+"\u00b2");
    13221323            else if (a < 0.01)
    13231324                return "< 0.01 " + aName+"\u00b2";
     
    13461347     * Imperial system (British Commonwealth and former British Empire).
    13471348     * @since 3406
    13481349     */
    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");
    13501351   
    13511352    /**
    13521353     * Nautical mile system (navigation, polar exploration).