Changeset 6042 in josm for trunk/src


Ignore:
Timestamp:
2013-06-29T09:29:40+02:00 (11 years ago)
Author:
akks
Message:

fix #8200: NPE when flushing tile cache, allow cleaning different types of TileLoader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r5963 r6042  
    4444import org.openstreetmap.gui.jmapviewer.MemoryTileCache;
    4545import org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader;
    46 import org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader.TileClearController;
    4746import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
    4847import org.openstreetmap.gui.jmapviewer.Tile;
     48import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
    4949import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
     50import org.openstreetmap.gui.jmapviewer.interfaces.TileClearController;
    5051import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
    5152import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
     
    229230    void clearTileCache(ProgressMonitor monitor) {
    230231        tileCache.clear();
    231         if (tileLoader instanceof OsmFileCacheTileLoader) {
    232             ((OsmFileCacheTileLoader)tileLoader).clearCache(tileSource, new TmsTileClearController(monitor));
     232        if (tileLoader instanceof CachedTileLoader) {
     233            ((CachedTileLoader)tileLoader).clearCache(tileSource, new TmsTileClearController(monitor));
    233234        }
    234235    }
Note: See TracChangeset for help on using the changeset viewer.