Changeset 5582 in josm
- Timestamp:
- 2012-11-16T23:30:23+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r5579 r5582 313 313 public String short_description; 314 314 public String icon; 315 public String icon_size; 315 316 public String locale_display_value; 316 317 public String locale_short_description; … … 341 342 342 343 public ImageIcon getIcon() { 343 return icon == null ? null : loadImageIcon(icon, zipIcons, 24); 344 return icon == null ? null : loadImageIcon(icon, zipIcons, parseInteger(icon_size)); 345 } 346 347 private Integer parseInteger(String str) { 348 if (str == null || "".equals(str)) 349 return null; 350 try { 351 return Integer.parseInt(str); 352 } catch (Exception e) { 353 // 354 } 355 return null; 344 356 } 345 357 … … 761 773 boolean cellHasFocus) { 762 774 PresetListEntry item = (PresetListEntry) value; 763 775 764 776 // Only return cached size, item is not shown 765 777 if (!list.isShowing() && item.prefferedWidth != -1 && item.prefferedHeight != -1) { … … 1276 1288 ImageProvider imgProv = new ImageProvider(iconName).setDirs(s).setId("presets").setArchive(zipIcons).setOptional(true); 1277 1289 if (maxSize != null) { 1278 imgProv.setMaxSize( 24);1290 imgProv.setMaxSize(maxSize); 1279 1291 } 1280 1292 return imgProv.get();
Note:
See TracChangeset
for help on using the changeset viewer.