Changeset 4291 in josm


Ignore:
Timestamp:
2011-08-08T00:02:32+02:00 (13 years ago)
Author:
stoecker
Message:

fix #6254- patch by simon04 - Combine ways should merge multivalue tags more intelligently

File:
1 edited

Legend:

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

    r3206 r4291  
    55
    66import java.util.ArrayList;
     7import java.util.Arrays;
    78import java.util.Collection;
    89import java.util.Collections;
     
    708709     */
    709710    public String getJoinedValues(String key) {
    710         StringBuffer buffer = new StringBuffer();
    711         List<String> values = new ArrayList<String>(getValues(key));
     711        StringBuilder buffer = new StringBuilder();
     712        HashSet<String> valSet = new HashSet<String>();
     713        for (String vs : getValues(key)) {
     714            valSet.addAll(Arrays.asList(vs.split(";")));
     715        }
     716        List<String> values = new ArrayList<String>(valSet);
    712717        values.remove("");
    713718        Collections.sort(values);
Note: See TracChangeset for help on using the changeset viewer.