This ensures that we see each tile getting downloaded and don't
mis-count, which would result in wedging the process
Signed-off-by: Keith Packard <keithp@keithp.com>
/* AltosUIMapTileListener methods */
/* AltosUIMapTileListener methods */
- public void notify_tile(AltosUIMapTile tile, int status) {
+ public synchronized void notify_tile(AltosUIMapTile tile, int status) {
if (status == AltosUIMapStore.loading)
return;
if (status == AltosUIMapStore.loading)
return;
}
/* AltosUIMapTileListener methods */
}
/* AltosUIMapTileListener methods */
- public void notify_tile(AltosUIMapTile tile, int status) {
+ public synchronized void notify_tile(AltosUIMapTile tile, int status) {
for (Point point : tiles.keySet()) {
if (tile == tiles.get(point)) {
Point screen = transform.screen(point);
for (Point point : tiles.keySet()) {
if (tile == tiles.get(point)) {
Point screen = transform.screen(point);
public AltosUIMapCache cache() { return cache; }
/* AltosUIMapStoreListener methods */
public AltosUIMapCache cache() { return cache; }
/* AltosUIMapStoreListener methods */
- public void notify_store(AltosUIMapStore store, int status) {
+ public synchronized void notify_store(AltosUIMapStore store, int status) {
if (load_listener != null) {
for (AltosUIMapTile tile : tiles.values())
if (store.equals(tile.store))
if (load_listener != null) {
for (AltosUIMapTile tile : tiles.values())
if (store.equals(tile.store))