Changeset 4882 in josm


Ignore:
Timestamp:
Feb 1, 2012 1:01:14 PM (16 months ago)
Author:
simon04
Message:

fix #7349 - relation shows up as "ref"

File:
1 edited

Legend:

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

    r4807 r4882  
    8282    } 
    8383 
    84     /** the default list of tags which are used as naming tags in relations */ 
     84    /** The default list of tags which are used as naming tags in relations. 
     85     * A ? prefix indicates a boolean value, for which the key (instead of the value) is used. 
     86     */ 
    8587    static public final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural", 
    86         "public_transport", ":LocationCode", "note", "building"}; 
     88        "public_transport", ":LocationCode", "note", "?building"}; 
    8789 
    8890    /** the current list of tags used as naming tags in relations */ 
     
    473475            } 
    474476            return null; 
    475         } else if (OsmUtils.isTrue(relation.get(nameTag))) { 
    476             return tr(nameTag); 
    477         } else if (OsmUtils.isFalse(relation.get(nameTag))) { 
     477        } else if (nameTag.startsWith("?") && OsmUtils.isTrue(relation.get(nameTag.substring(1)))) { 
     478            return tr(nameTag.substring(1)); 
     479        } else if (nameTag.startsWith("?") && OsmUtils.isFalse(relation.get(nameTag.substring(1)))) { 
    478480            return null; 
    479481        } else { 
Note: See TracChangeset for help on using the changeset viewer.