Changeset 6711 in josm for trunk/src/org


Ignore:
Timestamp:
2014-01-17T13:16:19+01:00 (11 years ago)
Author:
bastiK
Message:

closes #6797 - clear disabled image cache, when image loading is finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java

    r6378 r6711  
    3737
    3838    private boolean temporary;
    39     private Image disabledImg;
     39    private Image disabledImgCache;
    4040
    4141    public MapImage(String name, StyleSource source) {
     
    4545
    4646    public Image getDisabled() {
    47         if (disabledImg != null)
    48             return disabledImg;
     47        if (disabledImgCache != null)
     48                return disabledImgCache;
    4949        if (img == null)
    5050            getImage(); // fix #7498 ?
    51         disabledImg = GuiHelper.getDisabledImage(img);
    52         return disabledImg;
     51        disabledImgCache = GuiHelper.getDisabledImage(img);
     52        return disabledImgCache;
    5353    }
    5454
     
    7676                            }
    7777                            if (temporary) {
     78                                disabledImgCache = null;
    7879                                Main.map.mapView.preferenceChanged(null); // otherwise repaint is ignored, because layer hasn't changed
    7980                                Main.map.mapView.repaint();
Note: See TracChangeset for help on using the changeset viewer.