- Timestamp:
- 2016-01-22T23:29:57+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
r9492 r9571 250 250 return "<b>" + Utils.escapeReservedCharactersHTML(DIFFERENT) + "</b>"; 251 251 252 final StringBuilder res = new StringBuilder("<b>"); 253 res.append(Utils.escapeReservedCharactersHTML(getDisplayValue(true))) 254 .append("</b>"); 255 if (getShortDescription(true) != null) { 252 String displayValue = Utils.escapeReservedCharactersHTML(getDisplayValue(true)); 253 String shortDescription = getShortDescription(true); 254 255 if (displayValue.isEmpty() && (shortDescription == null || shortDescription.isEmpty())) 256 return " "; 257 258 final StringBuilder res = new StringBuilder("<b>").append(displayValue).append("</b>"); 259 if (shortDescription != null) { 256 260 // wrap in table to restrict the text width 257 261 res.append("<div style=\"width:300px; padding:0 0 5px 5px\">") 258 .append( getShortDescription(true))262 .append(shortDescription) 259 263 .append("</div>"); 260 264 } … … 295 299 @Override 296 300 public String toString() { 297 if ( value.equals(DIFFERENT))301 if (DIFFERENT.equals(value)) 298 302 return DIFFERENT; 299 return getDisplayValue(true).replaceAll("<.*>", ""); // remove additional markup, e.g. <br> 303 String displayValue = getDisplayValue(true); 304 return displayValue != null ? displayValue.replaceAll("<.*>", "") : null; // remove additional markup, e.g. <br> 300 305 } 301 306
Note:
See TracChangeset
for help on using the changeset viewer.