Changeset 4746 in josm for trunk/src


Ignore:
Timestamp:
2011-12-29T18:53:59+01:00 (8 years ago)
Author:
jttt
Message:

Fix #7201 combining ways screws up the order of ref tags

File:
1 edited

Legend:

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

    r4291 r4746  
    1313import java.util.List;
    1414import java.util.Map;
     15import java.util.Map.Entry;
    1516import java.util.Set;
    16 import java.util.Map.Entry;
    1717
    1818/**
     
    709709     */
    710710    public String getJoinedValues(String key) {
     711
     712        // See #7201 combining ways screws up the order of ref tags
     713        Set<String> originalValues = getValues();
     714        if (originalValues.size() == 1)
     715            return originalValues.iterator().next();
     716
    711717        StringBuilder buffer = new StringBuilder();
    712         HashSet<String> valSet = new HashSet<String>();
    713         for (String vs : getValues(key)) {
     718        Set<String> valSet = new HashSet<String>();
     719        for (String vs : originalValues) {
    714720            valSet.addAll(Arrays.asList(vs.split(";")));
    715721        }
Note: See TracChangeset for help on using the changeset viewer.