aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index c9f1166..76dcbc0 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1103,10 +1103,9 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
// update the caches
caches.addAll(cachesFromSearchResult);
+ final boolean excludeMine = Settings.isExcludeMyCaches();
+ final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
if (mapMode == MapMode.LIVE) {
- final boolean excludeMine = Settings.isExcludeMyCaches();
- final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
-
final List<Geocache> tempList = caches.getAsList();
for (Geocache cache : tempList) {
@@ -1118,10 +1117,10 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
countVisibleCaches();
if (cachesCnt < Settings.getWayPointsThreshold() || geocodeIntent != null) {
waypoints.clear();
- if (isLiveEnabled || mapMode == MapMode.COORDS) {
+ if (mapMode == MapMode.LIVE || mapMode == MapMode.COORDS) {
//All visible waypoints
CacheType type = Settings.getCacheType();
- Set<Waypoint> waypointsInViewport = cgData.loadWaypoints(viewport, Settings.isExcludeMyCaches(), Settings.isExcludeDisabledCaches(), type);
+ Set<Waypoint> waypointsInViewport = cgData.loadWaypoints(viewport, excludeMine, excludeDisabled, type);
waypoints.addAll(waypointsInViewport);
}
else
@@ -1133,7 +1132,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
}
else {
- // we don't want to see any stale waypoints any more fixes #2479
+ // we don't want to see any stale waypoints when above threshold
waypoints.clear();
}