Changeset 18076 in josm for trunk


Ignore:
Timestamp:
2021-07-19T22:55:31+02:00 (3 years ago)
Author:
Don-vip
Message:

see #2760 - revert r18075 - causes nodes to remain after deletion of converted ways

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r18075 r18076  
    2323import java.util.stream.Stream;
    2424
     25import org.openstreetmap.josm.data.gpx.GpxConstants;
    2526import org.openstreetmap.josm.spi.preferences.Config;
    2627import org.openstreetmap.josm.tools.Utils;
     
    798799            List<String> l = new LinkedList<>(Arrays.asList(
    799800                "source", "source_ref", "source:", "comment",
    800                 "watch", "watch:", "description", "attribution"));
     801                "watch", "watch:", "description", "attribution", GpxConstants.GPX_PREFIX));
    801802            l.addAll(getDiscardableKeys());
    802803            l.addAll(getWorkInProgressKeys());
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r18075 r18076  
    1717
    1818import org.openstreetmap.josm.actions.SimplifyWayAction;
    19 import org.openstreetmap.josm.data.gpx.GpxConstants;
    20 import org.openstreetmap.josm.data.osm.AbstractPrimitive;
    2119import org.openstreetmap.josm.data.osm.DataSet;
    2220import org.openstreetmap.josm.data.osm.Way;
     
    7270            double err = SimplifyWayAction.askSimplifyWays(ways, tr("Would you like to simplify the ways in the converted layer?"), true);
    7371            if (err > 0) {
    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                 }
     72                SimplifyWayAction.simplifyWays(ways, err);
    8173            }
    8274            final OsmDataLayer osmLayer = new OsmDataLayer(ds, tr("Converted from: {0}", layer.getName()), null);
Note: See TracChangeset for help on using the changeset viewer.