Skip to content

Commit

Permalink
Fix #23841: Bing: Automatically reload all tiles with `Error: Attribu…
Browse files Browse the repository at this point in the history
…tion is not loaded yet` after successfully loading the attribution

git-svn-id: https://josm.openstreetmap.de/svn/trunk@19192 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Aug 12, 2024
1 parent b107403 commit 64b00b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,15 @@ public void loadAllErrorTiles(boolean force) {
invalidate();
}

/**
* Remove all cached error tiles
* @since 19192
*/
public void clearErrorTiles() {
tileCache.clearErrorTiles();
invalidate();
}

@Override
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {
boolean done = (infoflags & (ERROR | FRAMEBITS | ALLBITS)) != 0;
Expand Down
4 changes: 2 additions & 2 deletions src/org/openstreetmap/josm/gui/layer/TMSLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public TMSLayer(ImageryInfo info) {
@Override
protected TMSTileSource getTileSource() {
return getTileSourceStatic(info, () -> {
Logging.debug("Attribution loaded, running loadAllErrorTiles");
this.loadAllErrorTiles(false);
Logging.debug("Attribution loaded, running clearErrorTiles");
this.clearErrorTiles();
});
}

Expand Down

0 comments on commit 64b00b2

Please sign in to comment.