Changeset 861 in josm


Ignore:
Timestamp:
2008-08-24T17:49:47+02:00 (16 years ago)
Author:
stoecker
Message:

added space to units. Fixes #798

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapScaler.java

    r804 r861  
    3333                LatLon ll2 = mv.getLatLon(100,0);
    3434                double dist = ll1.greatCircleDistance(ll2);
    35                 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+"km" : Math.round(dist*10)/10+"m";
     35                String text = dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10+" m";
    3636                Rectangle2D bound = g.getFontMetrics().getStringBounds(text, g);
    3737                g.setColor(Main.pref.getColor(marktr("scale"), Color.white));
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r752 r861  
    342342        }
    343343        public void setAngle(double a) {
    344                 angleText.setText(a < 0 ? "--" : Math.round(a*10)/10.0 + "°");
     344                angleText.setText(a < 0 ? "--" : Math.round(a*10)/10.0 + " °");
    345345        }
    346346        public void setHeading(double h) {
    347                 headingText.setText(h < 0 ? "--" : Math.round(h*10)/10.0 + "°");
     347                headingText.setText(h < 0 ? "--" : Math.round(h*10)/10.0 + " °");
    348348        }
    349349        public void setDist(double dist) {
    350                 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+"km" : Math.round(dist*10)/10.0 +"m";
     350                String text = dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10.0 +" m";
    351351                distText.setText(dist < 0 ? "--" : text);
    352352        }
Note: See TracChangeset for help on using the changeset viewer.