diff options
author | blafoo <github@blafoo.de> | 2012-02-08 00:44:27 +0100 |
---|---|---|
committer | blafoo <github@blafoo.de> | 2012-02-08 00:44:27 +0100 |
commit | 0679e76ce7da5640cbeedbeff008624052b83991 (patch) | |
tree | 3a8385e8f0b31b85691b1400e0a3e272f5e1bf01 /main/src/cgeo/geocaching/cgeowaypointadd.java | |
parent | db271dd2cd94a809d4422f58818a02403c08bbd6 (diff) | |
download | cgeo-0679e76ce7da5640cbeedbeff008624052b83991.zip cgeo-0679e76ce7da5640cbeedbeff008624052b83991.tar.gz cgeo-0679e76ce7da5640cbeedbeff008624052b83991.tar.bz2 |
Changed database handling
Diffstat (limited to 'main/src/cgeo/geocaching/cgeowaypointadd.java')
-rw-r--r-- | main/src/cgeo/geocaching/cgeowaypointadd.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/cgeowaypointadd.java b/main/src/cgeo/geocaching/cgeowaypointadd.java index 66e000e..fd5ba91 100644 --- a/main/src/cgeo/geocaching/cgeowaypointadd.java +++ b/main/src/cgeo/geocaching/cgeowaypointadd.java @@ -2,6 +2,7 @@ package cgeo.geocaching; import cgeo.geocaching.activity.AbstractActivity; import cgeo.geocaching.activity.ActivityMixin; +import cgeo.geocaching.enumerations.LoadFlags; import cgeo.geocaching.enumerations.WaypointType; import cgeo.geocaching.geopoint.DistanceParser; import cgeo.geocaching.geopoint.Geopoint; @@ -229,7 +230,7 @@ public class cgeowaypointadd extends AbstractActivity { if (waypoint != null && waypoint.getCoords() != null) { gp = waypoint.getCoords(); } - cgCache cache = app.getCacheByGeocode(geocode); + cgCache cache = app.loadCache(geocode, LoadFlags.LOADWAYPOINTS); cgeocoords coordsDialog = new cgeocoords(cgeowaypointadd.this, cache, gp, geo); coordsDialog.setCancelable(true); coordsDialog.setOnCoordinateUpdate(new cgeocoords.CoordinateUpdate() { @@ -323,7 +324,7 @@ public class cgeowaypointadd extends AbstractActivity { if (app.saveOwnWaypoint(id, geocode, waypoint)) { StaticMapsProvider.removeWpStaticMaps(id, geocode); if (Settings.isStoreOfflineWpMaps()) { - StaticMapsProvider.storeWaypointStaticMap(app.getCacheByGeocode(geocode), cgeowaypointadd.this, waypoint); + StaticMapsProvider.storeWaypointStaticMap(app.loadCache(geocode, LoadFlags.LOADCACHEORDB), cgeowaypointadd.this, waypoint); } finish(); return; |