Ignore:
Timestamp:
2014-01-28T19:36:46+01:00 (6 years ago)
Author:
simon04
Message:

fix #9623 - Create multipolygon: do not move fence_type tag to relation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r6721 r6765  
    316316    }
    317317
    318     public static final List<String> DEFAULT_LINEAR_TAGS = Arrays.asList(new String[] {"barrier", "source"});
     318    public static final List<String> DEFAULT_LINEAR_TAGS = Arrays.asList("barrier", "fence_type", "source");
    319319
    320320    /**
     
    325325     */
    326326    private static List<Command> removeTagsFromWaysIfNeeded( Relation relation ) {
    327         Map<String, String> values = new HashMap<String, String>();
    328 
    329         if( relation.hasKeys() ) {
    330             for( String key : relation.keySet() ) {
    331                 values.put(key, relation.get(key));
    332             }
    333         }
     327        Map<String, String> values = new HashMap<String, String>(relation.getKeys());
    334328
    335329        List<Way> innerWays = new ArrayList<Way>();
     
    372366            values.remove(linearTag);
    373367
    374         if( values.containsKey("natural") && values.get("natural").equals("coastline") )
     368        if ("coastline".equals(values.get("natural")))
    375369            values.remove("natural");
    376370
     
    386380
    387381            for (Way way : innerWays) {
    388                 if (way.hasKey(key) && (value.equals(way.get(key)))) {
     382                if (value.equals(way.get(key))) {
    389383                    affectedWays.add(way);
    390384                }
Note: See TracChangeset for help on using the changeset viewer.