Changeset 4744 in josm for trunk/src


Ignore:
Timestamp:
2011-12-29T16:16:17+01:00 (13 years ago)
Author:
Don-vip
Message:

Building presets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r4477 r4744  
    8484    /** the default list of tags which are used as naming tags in relations */
    8585    static public final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
    86         "public_transport", ":LocationCode", "note"};
     86        "public_transport", ":LocationCode", "note", "building"};
    8787
    8888    /** the current list of tags used as naming tags in relations */
     
    226226                                (way.get("railway") != null) ? tr("railway") :
    227227                                    (way.get("waterway") != null) ? tr("waterway") :
    228                                         (way.get("landuse") != null) ? tr("landuse") : null;
     228                                        (way.get("building") != null) ? tr("building") :
     229                                            (way.get("landuse") != null) ? tr("landuse") : null;
    229230                }
    230231                if(n == null)
     
    433434        if (name == null) {
    434435            String building  = relation.get("building");
    435             if(OsmUtils.isTrue(building)) {
     436            if (OsmUtils.isTrue(building)) {
    436437                name = tr("building");
    437438            } else if(building != null)
     
    472473            }
    473474            return null;
    474         } else
     475        } else if (OsmUtils.isTrue(relation.get(nameTag))) {
     476            return tr(nameTag);
     477        } else if (OsmUtils.isFalse(relation.get(nameTag))) {
     478            return null;
     479        } else {
    475480            return trc_lazy(nameTag, I18n.escape(relation.get(nameTag)));
     481        }
    476482    }
    477483
Note: See TracChangeset for help on using the changeset viewer.