Changeset 18075 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-07-19T20:43:01+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r17862 r18075 23 23 import java.util.stream.Stream; 24 24 25 import org.openstreetmap.josm.data.gpx.GpxConstants;26 25 import org.openstreetmap.josm.spi.preferences.Config; 27 26 import org.openstreetmap.josm.tools.Utils; … … 799 798 List<String> l = new LinkedList<>(Arrays.asList( 800 799 "source", "source_ref", "source:", "comment", 801 "watch", "watch:", "description", "attribution" , GpxConstants.GPX_PREFIX));800 "watch", "watch:", "description", "attribution")); 802 801 l.addAll(getDiscardableKeys()); 803 802 l.addAll(getWorkInProgressKeys()); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
r16570 r18075 17 17 18 18 import org.openstreetmap.josm.actions.SimplifyWayAction; 19 import org.openstreetmap.josm.data.gpx.GpxConstants; 20 import org.openstreetmap.josm.data.osm.AbstractPrimitive; 19 21 import org.openstreetmap.josm.data.osm.DataSet; 20 22 import org.openstreetmap.josm.data.osm.Way; … … 70 72 double err = SimplifyWayAction.askSimplifyWays(ways, tr("Would you like to simplify the ways in the converted layer?"), true); 71 73 if (err > 0) { 72 SimplifyWayAction.simplifyWays(ways, err); 74 try { 75 // Consider the GPX tags uninteresting temporarily, to make sure it doesn't prevent simplification to remove nodes 76 AbstractPrimitive.getUninterestingKeys().add(GpxConstants.GPX_PREFIX); 77 SimplifyWayAction.simplifyWays(ways, err); 78 } finally { 79 AbstractPrimitive.getUninterestingKeys().remove(GpxConstants.GPX_PREFIX); 80 } 73 81 } 74 82 final OsmDataLayer osmLayer = new OsmDataLayer(ds, tr("Converted from: {0}", layer.getName()), null);
Note:
See TracChangeset
for help on using the changeset viewer.