diff options
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 4 |
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; } |
