Changeset 3411 in josm


Ignore:
Timestamp:
2010-08-03T22:06:36+02:00 (10 years ago)
Author:
bastiK
Message:

fixed #5275 - Displayed co-ordinate precision adjustment

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r3067 r3411  
    3535    private static DecimalFormat cDmsMinuteFormatter = new DecimalFormat("00");
    3636    private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0");
    37     private static DecimalFormat cDdFormatter;
     37    public static DecimalFormat cDdFormatter;
    3838    static {
    3939        // Don't use the localized decimal separator. This way we can present
    4040        // a comma separated list of coordinates.
    4141        cDdFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK);
    42         cDdFormatter.applyPattern("###0.00000");
     42        cDdFormatter.applyPattern("###0.0000000");
    4343    }
    4444
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r3398 r3411  
    7777                continue;
    7878            }
    79             s.append(String.format(" lat=%f; lon=%f; ", n.getCoor().lat(), n.getCoor().lon()));
     79            s.append(String.format(" lat=%s; lon=%s; ", Double.toString(n.getCoor().lat()), Double.toString(n.getCoor().lon())));
    8080            addCommon(s, n);
    8181            addAttributes(s, n);
  • trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

    r2850 r3411  
    179179    private void updateBboxFields(Bounds area) {
    180180        if (area == null) return;
    181         latlon[0].setText(Double.toString(area.getMin().lat()));
    182         latlon[1].setText(Double.toString(area.getMin().lon()));
    183         latlon[2].setText(Double.toString(area.getMax().lat()));
    184         latlon[3].setText(Double.toString(area.getMax().lon()));
     181        latlon[0].setText(LatLon.cDdFormatter.format(area.getMin().lat()));
     182        latlon[1].setText(LatLon.cDdFormatter.format(area.getMin().lon()));
     183        latlon[2].setText(LatLon.cDdFormatter.format(area.getMax().lat()));
     184        latlon[3].setText(LatLon.cDdFormatter.format(area.getMax().lon()));
    185185        for (JTextField tf: latlon) {
    186186            resetErrorMessage(tf);
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r3408 r3411  
    586586                e.setExifImgDir(direction.doubleValue());
    587587            }
    588         } catch (CompoundException p) {
     588        } catch (Exception ex) { // (CompoundException and other exceptions, e.g. #5271)
    589589            // Do nothing
    590590        }
    591 
    592 
    593591    }
    594592
Note: See TracChangeset for help on using the changeset viewer.