Changeset 34485 in osm for applications/editors
- Timestamp:
- 2018-08-15T19:10:19+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DirectDownload.java
r34483 r34485 60 60 return; 61 61 } 62 GpxData dataNew = new GpxData(); 62 63 63 64 for (GpxTrack trk : data.getTracks()) { 64 65 HashMap<String, Object> attrib = new HashMap<>(trk.getAttributes()); 65 66 if (!trk.getAttributes().containsKey(GpxConstants.GPX_NAME)) { 66 System.out.println(track.filename);67 67 attrib.put(GpxConstants.GPX_NAME, track.filename); 68 68 } 69 69 if (!trk.getAttributes().containsKey(GpxConstants.GPX_DESC)) { 70 System.out.println(track.description);71 70 attrib.put(GpxConstants.GPX_DESC, track.description); 72 71 } 73 72 // replace the existing trace in the unmodifiable tracks 74 73 data.removeTrack(trk); 75 trk = new ImmutableGpxTrack(new ArrayList<>(trk.getSegments()), attrib); 76 data.addTrack(trk); 74 dataNew.addTrack(new ImmutableGpxTrack(new ArrayList<>(trk.getSegments()), attrib)); 77 75 } 76 77 data = dataNew; 78 78 79 79 final GpxLayer gpxLayer = new GpxLayer(data, (track.filename + " " + track.description).trim());
Note:
See TracChangeset
for help on using the changeset viewer.