Changeset 4126 in josm for trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
- Timestamp:
- 2011-06-07T19:05:14+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r4043 r4126 52 52 import org.openstreetmap.josm.data.coor.LatLon; 53 53 import org.openstreetmap.josm.data.gpx.GpxData; 54 import org.openstreetmap.josm.data.gpx.GpxRoute; 54 55 import org.openstreetmap.josm.data.gpx.GpxTrack; 55 56 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; … … 59 60 import org.openstreetmap.josm.data.osm.Way; 60 61 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 62 import org.openstreetmap.josm.data.projection.Projection; 61 63 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 62 64 import org.openstreetmap.josm.gui.HelpAwareOptionPane; … … 330 332 331 333 g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 332 Main.pref.getBoolean("mappaint.gpx.use-antialiasing", false) ?333 RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);334 Main.pref.getBoolean("mappaint.gpx.use-antialiasing", false) ? 335 RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); 334 336 335 337 /**************************************************************** … … 1231 1233 if (bestEN == null) 1232 1234 return null; 1233 WayPoint best = new WayPoint(Main. proj.eastNorth2latlon(bestEN));1235 WayPoint best = new WayPoint(Main.getProjection().eastNorth2latlon(bestEN)); 1234 1236 best.time = bestTime; 1235 1237 return best; … … 1490 1492 importer.importDataHandleExceptions(files, NullProgressMonitor.INSTANCE); 1491 1493 } 1492 1494 } 1495 1496 @Override 1497 public void projectionChanged(Projection oldValue, Projection newValue) { 1498 if (newValue == null) return; 1499 if (data.waypoints != null) { 1500 for (WayPoint wp : data.waypoints){ 1501 wp.invalidateEastNorthCache(); 1502 } 1503 } 1504 if (data.tracks != null){ 1505 for (GpxTrack track: data.tracks) { 1506 for (GpxTrackSegment segment: track.getSegments()) { 1507 for (WayPoint wp: segment.getWayPoints()) { 1508 wp.invalidateEastNorthCache(); 1509 } 1510 } 1511 } 1512 } 1513 if (data.routes != null) { 1514 for (GpxRoute route: data.routes) { 1515 if (route.routePoints == null) { 1516 continue; 1517 } 1518 for (WayPoint wp: route.routePoints) { 1519 wp.invalidateEastNorthCache(); 1520 } 1521 } 1522 } 1493 1523 } 1494 1524 }
Note:
See TracChangeset
for help on using the changeset viewer.