aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPortree-Kid <keith.paterson@gmx.de>2013-02-17 22:07:16 +0100
committerPortree-Kid <keith.paterson@gmx.de>2013-02-17 22:07:16 +0100
commita883000c3167215b36fce8a3732f8858e812e976 (patch)
treef22d59827d7ee9ec7c1abde56359e09d0810190f
parent7aa68e3fa78a1e59b21f3e923d2a96003e76a79b (diff)
downloadcgeo-a883000c3167215b36fce8a3732f8858e812e976.zip
cgeo-a883000c3167215b36fce8a3732f8858e812e976.tar.gz
cgeo-a883000c3167215b36fce8a3732f8858e812e976.tar.bz2
Live Mode not used correctly Fixes #2479
-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();
}