Ignore:
Timestamp:
2017-07-30T06:29:03+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1066 - Collapsible "if" statements should be merged

File:
1 edited

Legend:

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

    r12279 r12541  
    993993                drawImageInside(g, img, anchorImage, anchorScreen, null);
    994994            }
    995             if (tile instanceof ReprojectionTile) {
     995            if (tile instanceof ReprojectionTile && ((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) {
    996996                // This means we have a reprojected tile in memory cache, but not at
    997997                // current scale. Generally, the positioning of the tile will still
     
    999999                // reprojected to the target scale. The original tile image should
    10001000                // still be in disk cache, so this is fairly cheap.
    1001                 if (((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) {
    1002                     ((ReprojectionTile) tile).invalidate();
    1003                     loadTile(tile, false);
    1004                 }
     1001                ((ReprojectionTile) tile).invalidate();
     1002                loadTile(tile, false);
    10051003            }
    10061004
Note: See TracChangeset for help on using the changeset viewer.