From bdf96c04709119a365923d08a58f0691dd9b5790 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 20 Oct 2010 11:57:08 +0000 Subject: [PATCH] bugfix git-svn-id: https://osmand.googlecode.com/svn/trunk@581 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- OsmAnd/src/net/osmand/activities/MapActivity.java | 10 +++++++--- OsmAnd/src/net/osmand/views/FavoritesLayer.java | 4 ---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/activities/MapActivity.java b/OsmAnd/src/net/osmand/activities/MapActivity.java index 04e819e7a7..8cb4f5120c 100644 --- a/OsmAnd/src/net/osmand/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/activities/MapActivity.java @@ -1298,7 +1298,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso } else if(item == 5){ if(gpxLayer.isVisible()){ gpxLayer.clearCurrentGPX(); - favoritesLayer.getFavorites().setFavoritePointsFromGPXFile(null); + getFavoritesHelper().setFavoritePointsFromGPXFile(null); } else { dialog.dismiss(); useGPXFileLayer(false, null); @@ -1388,7 +1388,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso pt.setName(p.name); pts.add(pt); } - favoritesLayer.getFavorites().setFavoritePointsFromGPXFile(pts); + getFavoritesHelper().setFavoritePointsFromGPXFile(pts); gpxLayer.setTracks(res.locations); } mapView.refreshMap(); @@ -1403,7 +1403,11 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso builder.show(); } - } + } + + public FavouritesDbHelper getFavoritesHelper() { + return ((OsmandApplication)getApplication()).getFavorites(); + } private void useGPXRouting(final LatLon endForRouting, final GPXFileResult res) { Builder builder = new AlertDialog.Builder(this); diff --git a/OsmAnd/src/net/osmand/views/FavoritesLayer.java b/OsmAnd/src/net/osmand/views/FavoritesLayer.java index 51c5ac4f6d..2a64b5b519 100644 --- a/OsmAnd/src/net/osmand/views/FavoritesLayer.java +++ b/OsmAnd/src/net/osmand/views/FavoritesLayer.java @@ -169,10 +169,6 @@ public class FavoritesLayer implements OsmandMapLayer, ContextMenuLayer.IContext return null; } - public FavouritesDbHelper getFavorites() { - return favorites; - } - @Override public String getObjectDescription(Object o) {