Ticket #9481: 9481.patch

File 9481.patch, 1.4 KB (added by simon04, 11 years ago)
  • src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java

    diff --git a/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java b/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
    index 46e9f67..28678c0 100644
    a b public abstract class LabelCompositionStrategy {  
    167167         * @since 6541
    168168         */
    169169        static public final String[] DEFAULT_NAME_COMPLEMENT_TAGS = {
    170             "capacity"
     170                "capacity",
     171                "addr:housenumber",
    171172        };
    172173
    173174        private List<String> nameTags = new ArrayList<String>();
    public abstract class LabelCompositionStrategy {  
    263264
    264265        private String getPrimitiveName(OsmPrimitive n) {
    265266            String name = null;
     267            String usedNameTag = null;
    266268            if (!n.hasKeys()) return null;
    267269            for (String rn : nameTags) {
    268270                name = n.get(rn);
    269271                if (name != null) {
     272                    usedNameTag = rn;
    270273                    break;
    271274                }
    272275            }
    273276            for (String rn : nameComplementTags) {
    274277                String comp = n.get(rn);
    275                 if (comp != null) {
     278                if (comp != null && !rn.equals(usedNameTag)) {
    276279                    if (name == null) {
    277280                        name = comp;
    278281                    } else {