aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Jacob <mjacob@union06.de>2013-02-23 11:11:39 -0800
committerMarco Jacob <mjacob@union06.de>2013-02-23 11:11:39 -0800
commit329f74f5d00544aa39edadffd0e56d1aaf800935 (patch)
treece538b78375af51046ffb28558b91766cbf6d22c
parent9ca04d070303afbad0154b2f5d8575a93c942123 (diff)
parentd0fcf318d437e773762e0c7731a7b91c00aebc1f (diff)
downloadcgeo-329f74f5d00544aa39edadffd0e56d1aaf800935.zip
cgeo-329f74f5d00544aa39edadffd0e56d1aaf800935.tar.gz
cgeo-329f74f5d00544aa39edadffd0e56d1aaf800935.tar.bz2
Merge pull request #2517 from marco-jacob/updatMapIconsByNearby
fixes #2515 - update live map icons by nearby search
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index c917a37..b2216c7 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1101,6 +1101,8 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
downloaded = true;
Set<Geocache> cachesFromSearchResult = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_WAYPOINTS);
// update the caches
+ // new collection type needs to remove first
+ caches.removeAll(cachesFromSearchResult);
caches.addAll(cachesFromSearchResult);
if (mapMode == MapMode.LIVE) {
@@ -1190,6 +1192,8 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (searchResult != null) {
Set<Geocache> result = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB);
// update the caches
+ // new collection type needs to remove first
+ caches.removeAll(result);
caches.addAll(result);
lastSearchResult = searchResult;
}