diff options
author | rsudev <rasch@munin-soft.de> | 2013-02-23 13:47:15 -0800 |
---|---|---|
committer | rsudev <rasch@munin-soft.de> | 2013-02-23 13:47:15 -0800 |
commit | 3557f8c05703169b0cc50c1a05f30c9e8e01ae50 (patch) | |
tree | b25ca678972d55385c1ab40d4f3c8f9fdf679388 | |
parent | 329f74f5d00544aa39edadffd0e56d1aaf800935 (diff) | |
parent | 6067d5dcbf52a59f85c9f9921cef5d756117d0f8 (diff) | |
download | cgeo-3557f8c05703169b0cc50c1a05f30c9e8e01ae50.zip cgeo-3557f8c05703169b0cc50c1a05f30c9e8e01ae50.tar.gz cgeo-3557f8c05703169b0cc50c1a05f30c9e8e01ae50.tar.bz2 |
Merge pull request #2491 from Portree-Kid/master-master
Live Mode not used correctly Fixes #2479
-rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index b2216c7..7a59e5b 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -1105,10 +1105,9 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto caches.removeAll(cachesFromSearchResult); 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) { @@ -1120,20 +1119,26 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto countVisibleCaches(); if (cachesCnt < Settings.getWayPointsThreshold() || geocodeIntent != null) { waypoints.clear(); - if (isLiveEnabled || mapMode == MapMode.COORDS) { + if (isLiveEnabled || 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 { + // we don't want to see any stale + waypoints.clear(); //All waypoints from the viewed caches for (Geocache c : caches.getAsList()) { waypoints.addAll(c.getWaypoints()); } } } + else { + // we don't want to see any stale waypoints when above threshold + waypoints.clear(); + } //render displayExecutor.execute(new DisplayRunnable(viewport)); |