Ticket #23841: 23841.core.patch

File 23841.core.patch, 3.3 KB (added by taylor.smock, 20 months ago)
  • src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java

    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  
    136136        public void run() {
    137137            BingAttributionData attributionLoader = new BingAttributionData();
    138138            try {
     139                if (true) throw new IOException("Temp exception");
    139140                String xml = attributionLoader.updateIfRequiredString();
    140141                List<Attribution> ret;
    141142                try (StringReader sr = new StringReader(xml)) {
  • src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    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  
    965965        invalidate();
    966966    }
    967967
     968    /**
     969     * Remove all cached error tiles
     970     * @since xxx
     971     */
     972    public void clearAllErrorTiles() {
     973        tileCache.clearErrorTiles();
     974        invalidate();
     975    }
     976
    968977    @Override
    969978    public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {
    970979        boolean done = (infoflags & (ERROR | FRAMEBITS | ALLBITS)) != 0;
  • src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    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  
    2121import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader;
    2222import org.openstreetmap.josm.data.preferences.BooleanProperty;
    2323import org.openstreetmap.josm.data.preferences.IntegerProperty;
     24import org.openstreetmap.josm.gui.util.GuiHelper;
    2425import org.openstreetmap.josm.tools.Logging;
    2526
    2627/**
     
    7576    @Override
    7677    protected TMSTileSource getTileSource() {
    7778        return getTileSourceStatic(info, () -> {
    78             Logging.debug("Attribution loaded, running loadAllErrorTiles");
    79             this.loadAllErrorTiles(false);
     79            Logging.debug("Attribution loaded, running clearAllErrorTiles");
     80            this.clearAllErrorTiles();
    8081        });
    8182    }
    8283