- Timestamp:
- 2018-10-08T01:00:47+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 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 } -
trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
r14138 r14306 82 82 private final JCheckBox showSplashScreen = new JCheckBox(tr("Show splash screen at startup")); 83 83 private final JCheckBox showID = new JCheckBox(tr("Show object ID in selection lists")); 84 private final JCheckBox showVersion = new JCheckBox(tr("Show object version in selection lists")); 84 85 private final JCheckBox showCoor = new JCheckBox(tr("Show node coordinates in selection lists")); 85 86 private final JCheckBox showLocalizedName = new JCheckBox(tr("Show localized name in selection lists")); … … 133 134 showID.setSelected(Config.getPref().getBoolean("osm-primitives.showid", false)); 134 135 136 // Show version in selection 137 showVersion.setToolTipText(tr("Show object version in selection lists")); 138 showVersion.setSelected(Config.getPref().getBoolean("osm-primitives.showversion", false)); 139 135 140 // Show Coordinates in selection 136 141 showCoor.setToolTipText(tr("Show node coordinates in selection lists")); … … 147 152 148 153 panel.add(showID, GBC.eop().insets(20, 0, 0, 0)); 154 panel.add(showVersion, GBC.eop().insets(20, 0, 0, 0)); 149 155 panel.add(showCoor, GBC.eop().insets(20, 0, 0, 0)); 150 156 panel.add(showLocalizedName, GBC.eop().insets(20, 0, 0, 0)); … … 211 217 Config.getPref().putBoolean("draw.splashscreen", showSplashScreen.isSelected()); 212 218 Config.getPref().putBoolean("osm-primitives.showid", showID.isSelected()); 219 Config.getPref().putBoolean("osm-primitives.showversion", showVersion.isSelected()); 213 220 Config.getPref().putBoolean("osm-primitives.showcoor", showCoor.isSelected()); 214 221 Config.getPref().putBoolean("osm-primitives.localize-name", showLocalizedName.isSelected());
Note:
See TracChangeset
for help on using the changeset viewer.