aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgeo/geocaching/mapcommon/cgeomap.java4
-rw-r--r--src/cgeo/geocaching/mapsforge/mfMapView.java5
2 files changed, 3 insertions, 6 deletions
diff --git a/src/cgeo/geocaching/mapcommon/cgeomap.java b/src/cgeo/geocaching/mapcommon/cgeomap.java
index 0722981..a57d954 100644
--- a/src/cgeo/geocaching/mapcommon/cgeomap.java
+++ b/src/cgeo/geocaching/mapcommon/cgeomap.java
@@ -977,7 +977,7 @@ public class cgeomap extends MapBase {
//2. fetch and draw(in another thread) and then insert into the db caches from geocaching.com - dont draw/insert if exist in memory?
// stage 1 - pull and render from the DB only
- if (settings.maplive == 0) {
+ if (!live || settings.maplive == 0) {
searchId = app.getStoredInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
} else {
searchId = app.getCachedInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
@@ -1022,7 +1022,7 @@ public class cgeomap extends MapBase {
// stage 2 - pull and render from geocaching.com
//this should just fetch and insert into the db _and_ be cancel-able if the viewport changes
- if (settings.maplive >= 1) {
+ if (live && settings.maplive >= 1) {
if (downloadThread != null && downloadThread.isWorking()) {
downloadThread.stopIt();
}
diff --git a/src/cgeo/geocaching/mapsforge/mfMapView.java b/src/cgeo/geocaching/mapsforge/mfMapView.java
index e463a26..e2908a5 100644
--- a/src/cgeo/geocaching/mapsforge/mfMapView.java
+++ b/src/cgeo/geocaching/mapsforge/mfMapView.java
@@ -146,10 +146,7 @@ public class mfMapView extends MapView implements MapViewImpl {
* @return true if the file is a valid map file, false otherwise.
*/
public static boolean isValidMapFile(String file) {
- MapDatabase testDatabase = new MapDatabase();
- boolean isValid = testDatabase.openFile(file);
- testDatabase.closeFile();
- return isValid;
+ return MapDatabase.isValidMapFile(file);
}