Ignore:
Timestamp:
02.08.2009 14:36:40 (3 years ago)
Author:
Gubaer
Message:

towards a fix for #3142: JOSM applet class no longer functional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r1761 r1879  
    6666    public SlippyMapChooser() { 
    6767        super(); 
    68         cachedLoader = new OsmFileCacheTileLoader(this); 
     68        try { 
     69            cachedLoader = new OsmFileCacheTileLoader(this); 
     70        } catch(SecurityException e) { 
     71            // set to null if a SecurityException was thrown 
     72            // while creating the cachedLoader 
     73            // 
     74            cachedLoader = null; 
     75        } 
    6976        uncachedLoader = new OsmTileLoader(this); 
    7077        setZoomContolsVisible(false); 
     
    7481        // the area before the component has been displayed the first time 
    7582        setBounds(new Rectangle(getMinimumSize())); 
    76         setFileCacheEnabled(Main.pref.getBoolean("slippy_map_chooser.file_cache", true)); 
     83        if (cachedLoader == null) { 
     84            setFileCacheEnabled(false); 
     85        } else { 
     86            setFileCacheEnabled(Main.pref.getBoolean("slippy_map_chooser.file_cache", true)); 
     87        } 
    7788        setMaxTilesInMemory(Main.pref.getInteger("slippy_map_chooser.max_tiles", 1000)); 
    7889 
Note: See TracChangeset for help on using the changeset viewer.