Changeset 14306 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2018-10-08T01:00:47+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
r13766 r14306 113 113 114 114 /** 115 * Decorates the name of primitive with its id, if the preference 116 * <code>osm-primitives.showid</code> is set. Shows unique id if osm-primitives.showid.new-primitives is set 117 * 118 * @param name the name without the id 115 * Decorates the name of primitive with its id and version, if the preferences 116 * <code>osm-primitives.showid</code> and <code>osm-primitives.showversion</code> are set. 117 * Shows unique id if <code>osm-primitives.showid.new-primitives</code> is set 118 * 119 * @param name the name without the id 119 120 * @param primitive the primitive 120 121 */ 121 122 protected void decorateNameWithId(StringBuilder name, IPrimitive primitive) { 122 123 if (Config.getPref().getBoolean("osm-primitives.showid")) { 123 if (Config.getPref().getBoolean("osm-primitives.showid.new-primitives")) { 124 name.append(tr(" [id: {0}]", primitive.getUniqueId())); 124 long id = Config.getPref().getBoolean("osm-primitives.showid.new-primitives") ? 125 primitive.getUniqueId() : primitive.getId(); 126 if (Config.getPref().getBoolean("osm-primitives.showversion")) { 127 name.append(tr(" [id: {0}, v{1}]", id, primitive.getVersion())); 125 128 } else { 126 name.append(tr(" [id: {0}]", primitive.getId())); 127 } 129 name.append(tr(" [id: {0}]", id)); 130 } 131 } else if (Config.getPref().getBoolean("osm-primitives.showversion")) { 132 name.append(tr(" [v{0}]", primitive.getVersion())); 128 133 } 129 134 }
Note:
See TracChangeset
for help on using the changeset viewer.