aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Krause <chkr@plauener.de>2014-08-19 03:51:15 +0200
committerChristian Krause <chkr@plauener.de>2014-08-19 04:01:39 +0200
commitce9fa62c58102031f5b11e97a1cb1c4ffd6a32c9 (patch)
treeeff7f07ce22fad14d94d97d508056ae564301901
parent6a564806ba3d7d5786c8d59ca5b4a87c4a76753d (diff)
downloadcgeo-ce9fa62c58102031f5b11e97a1cb1c4ffd6a32c9.zip
cgeo-ce9fa62c58102031f5b11e97a1cb1c4ffd6a32c9.tar.gz
cgeo-ce9fa62c58102031f5b11e97a1cb1c4ffd6a32c9.tar.bz2
Don't update overlayCaches if just one point is displayed
This fixes a race conditions between doDisplayRun() and displayPoint() which caused the wrong waypoint to be displayed.
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index c2317d0..b0e6464 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1259,8 +1259,10 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
itemsToDisplay.add(getCacheItem(cache));
}
}
-
- overlayCaches.updateItems(itemsToDisplay);
+ // don't add other waypoints to overlayCaches if just one point should be displayed
+ if (coordsIntent == null) {
+ overlayCaches.updateItems(itemsToDisplay);
+ }
displayHandler.sendEmptyMessage(INVALIDATE_MAP);
displayHandler.sendEmptyMessage(UPDATE_TITLE);