Changeset 1722 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java
- Timestamp:
- 2009-07-03T12:33:32+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java
r1180 r1722 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.projection.Mercator; 15 16 import org.openstreetmap.josm.data.projection.Projection; 16 17 import org.openstreetmap.josm.data.coor.LatLon.CoordinateFormat; 18 import org.openstreetmap.josm.data.osm.Node; 17 19 import org.openstreetmap.josm.tools.GBC; 18 20 … … 28 30 29 31 for (int i = 0; i < projectionCombo.getItemCount(); ++i) { 30 if (projectionCombo.getItemAt(i).getClass().getName().equals(Main.pref.get("projection" ))) {32 if (projectionCombo.getItemAt(i).getClass().getName().equals(Main.pref.get("projection", Mercator.class.getName()))) { 31 33 projectionCombo.setSelectedIndex(i); 32 34 break; … … 54 56 55 57 public boolean ok() { 56 boolean restart = Main.pref.put("projection", 57 projectionCombo.getSelectedItem().getClass().getName()); 58 String projname = projectionCombo.getSelectedItem().getClass().getName(); 59 if(Main.pref.put("projection", projname)) 60 Main.setProjection(projname); 58 61 if(Main.pref.put("coordinates", 59 62 ((CoordinateFormat)coordinatesCombo.getSelectedItem()).name())) 60 restart = true;61 return restart;63 Node.setCoordinateFormat(); 64 return false; 62 65 } 63 66 }
Note:
See TracChangeset
for help on using the changeset viewer.