Changeset 9481 in josm
- Timestamp:
- 2016-01-16T10:28:39+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r9461 r9481 746 746 final GpxData data = toGpxData(); 747 747 final GpxLayer gpxLayer = new GpxLayer(data, tr("Converted from: {0}", getName())); 748 final String filename = getAssociatedFile().getName().replaceAll(Pattern.quote(".gpx.osm") + "$", "") + ".gpx"; 749 gpxLayer.setAssociatedFile(new File(getAssociatedFile().getParentFile(), filename)); 748 if (getAssociatedFile() != null) { 749 final String filename = getAssociatedFile().getName().replaceAll(Pattern.quote(".gpx.osm") + "$", "") + ".gpx"; 750 gpxLayer.setAssociatedFile(new File(getAssociatedFile().getParentFile(), filename)); 751 } 750 752 Main.main.addLayer(gpxLayer); 751 753 if (Main.pref.getBoolean("marker.makeautomarkers", true) && !data.waypoints.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.