Changeset 4744 in josm
- Timestamp:
- 2011-12-29T16:16:17+01:00 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/defaultpresets.xml
r4708 r4744 3807 3807 <group name="Man Made" icon="presets/works.png"> 3808 3808 <item name="Building" icon="styles/standard/misc/landmark/building.png" type="node,closedway,relation"> 3809 <key key="building" value="yes" /> 3809 <link href="http://wiki.openstreetmap.org/wiki/Key:building" 3810 de.href="http://wiki.openstreetmap.org/wiki/DE:Key:building" 3811 fr.href="http://wiki.openstreetmap.org/wiki/FR:Key:building" 3812 it.href="http://wiki.openstreetmap.org/wiki/IT:Key:building" 3813 ja.href="http://wiki.openstreetmap.org/wiki/JA:Key:building" 3814 nl.href="http://wiki.openstreetmap.org/wiki/NL:Key:building" 3815 no.href="http://wiki.openstreetmap.org/wiki/NO:Key:building" 3816 pl.href="http://wiki.openstreetmap.org/wiki/PL:Key:building" 3817 ru.href="http://wiki.openstreetmap.org/wiki/RU:Key:building" /> 3818 <label text="Edit Building" /> 3819 <combo key="building" text="Building" values="yes,roof,garage,industrial,church,school,hangar,commercial,farm,transportation,greenhouse,office,university" default="yes" /> 3820 <text key="name" text="Name" default="" delete_if_empty="true" /> 3821 </item> 3822 <item name="Residential Building" icon="styles/standard/misc/landmark/building.png" type="node,closedway,relation"> 3823 <link href="http://wiki.openstreetmap.org/wiki/Key:building" 3824 de.href="http://wiki.openstreetmap.org/wiki/DE:Key:building" 3825 fr.href="http://wiki.openstreetmap.org/wiki/FR:Key:building" 3826 it.href="http://wiki.openstreetmap.org/wiki/IT:Key:building" 3827 ja.href="http://wiki.openstreetmap.org/wiki/JA:Key:building" 3828 nl.href="http://wiki.openstreetmap.org/wiki/NL:Key:building" 3829 no.href="http://wiki.openstreetmap.org/wiki/NO:Key:building" 3830 pl.href="http://wiki.openstreetmap.org/wiki/PL:Key:building" 3831 ru.href="http://wiki.openstreetmap.org/wiki/RU:Key:building" /> 3832 <label text="Edit Residential Building" /> 3833 <combo key="building" text="Building" values="residential,apartments,house,hut,terraced,detached,roof" default="residential" /> 3834 <text key="name" text="Name" default="" delete_if_empty="true" /> 3810 3835 </item> 3811 3836 <item name="Tower" icon="presets/tower.png" type="node,closedway"> -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r4477 r4744 84 84 /** the default list of tags which are used as naming tags in relations */ 85 85 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"}; 87 87 88 88 /** the current list of tags used as naming tags in relations */ … … 226 226 (way.get("railway") != null) ? tr("railway") : 227 227 (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; 229 230 } 230 231 if(n == null) … … 433 434 if (name == null) { 434 435 String building = relation.get("building"); 435 if(OsmUtils.isTrue(building)) { 436 if (OsmUtils.isTrue(building)) { 436 437 name = tr("building"); 437 438 } else if(building != null) … … 472 473 } 473 474 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 { 475 480 return trc_lazy(nameTag, I18n.escape(relation.get(nameTag))); 481 } 476 482 } 477 483
Note:
See TracChangeset
for help on using the changeset viewer.