Ignore:
Timestamp:
2021-02-21T13:17:06+01:00 (4 years ago)
Author:
wiktorn
Message:

Correct memory information

Correct message sent to logging when estimating cache size. Add rendering of the
message when memory allocation failed for drawing the layer.

See: #20497

File:
1 edited

Legend:

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

    r17496 r17504  
    662662                Math.pow(2d, ZOOM_OFFSET.get()) * visibileTiles // use offset to decide, how many tiles are visible
    663663                * 8);
    664         Logging.info("AbstractTileSourceLayer: estimated visible tiles: {0}, estimated cache size: {1}", visibileTiles, ret);
     664        Logging.info("AbstractTileSourceLayer: estimated tiles proccessed on current zoom level: {0}, estimated cache size: {1}", visibileTiles, ret);
    665665        return ret;
    666666    }
     
    19771977            if (memory != null) {
    19781978                doPaint(graphics);
     1979            } else {
     1980                Graphics g = graphics.getDefaultGraphics();
     1981                Color oldColor = g.getColor();
     1982                g.setColor(Color.BLACK);
     1983                g.drawString("Not enough memory to draw layer: " + getName(), 10, 120);
     1984                g.setColor(Color.RED);
     1985                g.drawString("Not enough memory to draw layer: " + getName(), 11, 121);
     1986                g.setColor(oldColor);
    19791987            }
    19801988        }
Note: See TracChangeset for help on using the changeset viewer.