Subject: [PATCH] #23841: Bing: Automatically reload all tiles with `Error: Attribution is not loaded yet` after su...
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java b/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
|
a
|
b
|
|
| 136 | 136 | public void run() { |
| 137 | 137 | BingAttributionData attributionLoader = new BingAttributionData(); |
| 138 | 138 | try { |
| | 139 | if (true) throw new IOException("Temp exception"); |
| 139 | 140 | String xml = attributionLoader.updateIfRequiredString(); |
| 140 | 141 | List<Attribution> ret; |
| 141 | 142 | try (StringReader sr = new StringReader(xml)) { |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java b/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
|
a
|
b
|
|
| 965 | 965 | invalidate(); |
| 966 | 966 | } |
| 967 | 967 | |
| | 968 | /** |
| | 969 | * Remove all cached error tiles |
| | 970 | * @since xxx |
| | 971 | */ |
| | 972 | public void clearAllErrorTiles() { |
| | 973 | tileCache.clearErrorTiles(); |
| | 974 | invalidate(); |
| | 975 | } |
| | 976 | |
| 968 | 977 | @Override |
| 969 | 978 | public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { |
| 970 | 979 | boolean done = (infoflags & (ERROR | FRAMEBITS | ALLBITS)) != 0; |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/layer/TMSLayer.java b/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
|
a
|
b
|
|
| 21 | 21 | import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader; |
| 22 | 22 | import org.openstreetmap.josm.data.preferences.BooleanProperty; |
| 23 | 23 | import org.openstreetmap.josm.data.preferences.IntegerProperty; |
| | 24 | import org.openstreetmap.josm.gui.util.GuiHelper; |
| 24 | 25 | import org.openstreetmap.josm.tools.Logging; |
| 25 | 26 | |
| 26 | 27 | /** |
| … |
… |
|
| 75 | 76 | @Override |
| 76 | 77 | protected TMSTileSource getTileSource() { |
| 77 | 78 | return getTileSourceStatic(info, () -> { |
| 78 | | Logging.debug("Attribution loaded, running loadAllErrorTiles"); |
| 79 | | this.loadAllErrorTiles(false); |
| | 79 | Logging.debug("Attribution loaded, running clearAllErrorTiles"); |
| | 80 | this.clearAllErrorTiles(); |
| 80 | 81 | }); |
| 81 | 82 | } |
| 82 | 83 | |