X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIMapView.java;fp=altosuilib%2FAltosUIMapView.java;h=34a85f52efb992b8ef2f4df2e6ee030ce2eb15cf;hp=1abd173121852a321ac17e40c738e0eb3c28dc54;hb=ade2cc9abb8ca403a9ae5d1f9c145ab72ce94919;hpb=97269bb90c1602a1f8c54fc7b6c34383a0370621 diff --git a/altosuilib/AltosUIMapView.java b/altosuilib/AltosUIMapView.java index 1abd1731..34a85f52 100644 --- a/altosuilib/AltosUIMapView.java +++ b/altosuilib/AltosUIMapView.java @@ -370,7 +370,7 @@ public class AltosUIMapView extends Component implements MouseMotionListener, Mo for (Point point : to_remove) tiles.remove(point); - cache.set_cache_size(((lower_right.y - upper_left.y) / px_size + 1) * ((lower_right.x - upper_left.x) / px_size + 1)); + cache.set_cache_size((getWidth() / px_size + 2) * (getHeight() / px_size + 2)); for (int y = upper_left.y; y <= lower_right.y; y += px_size) { for (int x = upper_left.x; x <= lower_right.x; x += px_size) { Point point = new Point(x, y);