Changeset 11883 in josm for trunk/src


Ignore:
Timestamp:
2017-04-10T10:54:30+02:00 (8 years ago)
Author:
bastiK
Message:

see #7427 - actually use disk cache on scale change and do not force redownload

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

Legend:

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

    r11875 r11883  
    11531153                // still be in disk cache, so this is fairly cheap.
    11541154                if (((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) {
    1155                     loadTile(tile, true);
     1155                    ((ReprojectionTile) tile).invalidate();
     1156                    loadTile(tile, false);
    11561157                }
    11571158            }
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java

    r11882 r11883  
    6666            transform(image);
    6767        }
     68    }
     69
     70    /**
     71     * Invalidate tile - mark it as not loaded.
     72     */
     73    public synchronized void invalidate() {
     74        this.loaded = false;
     75        this.loading = false;
     76        this.error = false;
     77        this.error_message = null;
    6878    }
    6979
Note: See TracChangeset for help on using the changeset viewer.