Changeset 4715 in josm for trunk/src/org


Ignore:
Timestamp:
2011-12-26T23:27:03+01:00 (9 years ago)
Author:
simon04
Message:

see #7182 - Individual Icons for Imagery Background (make loading more robust)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r4713 r4715  
    2828        try {
    2929            if (info.getIcon() != null) {
    30                 ImageIcon i = new ImageRequest().setName(info.getIcon()).setMaxHeight(MAX_ICON_SIZE).setMaxWidth(MAX_ICON_SIZE).get();
    31                 putValue(Action.SMALL_ICON, i);
     30                ImageIcon i = new ImageRequest().setOptional(true).setName(info.getIcon()).
     31                        setMaxHeight(MAX_ICON_SIZE).setMaxWidth(MAX_ICON_SIZE).get();
     32                if (i != null) {
     33                    putValue(Action.SMALL_ICON, i);
     34                }
    3235            }
    3336        } catch (Exception ex) {
  • trunk/src/org/openstreetmap/josm/tools/ImageRequest.java

    r4714 r4715  
    9393                String ext = name.indexOf('.') != -1 ? "" : ".???";
    9494                throw new RuntimeException(tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.", name + ext));
    95             } else
     95            } else {
     96                System.out.println(tr("Failed to locate image ''{0}''", name));
    9697                return null;
     98            }
    9799        }
    98100        if (maxWidth != -1 || maxHeight != -1)
Note: See TracChangeset for help on using the changeset viewer.