bug fix
git-svn-id: https://osmand.googlecode.com/svn/trunk@386 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
5caaa1a60d
commit
46337945d2
2 changed files with 7 additions and 6 deletions
|
@ -701,7 +701,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
|
||||
updateApplicationModeSettings();
|
||||
|
||||
favoritesLayer.reloadFavorites();
|
||||
favoritesLayer.reloadFavorites(this);
|
||||
poiMapLayer.setFilter(OsmandSettings.getPoiFilterForMap(this));
|
||||
backToLocation.setVisibility(View.INVISIBLE);
|
||||
|
||||
|
@ -1271,7 +1271,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
Toast.makeText(MapActivity.this, getString(R.string.fav_points_edited), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
helper.close();
|
||||
favoritesLayer.reloadFavorites();
|
||||
favoritesLayer.reloadFavorites(MapActivity.this);
|
||||
}
|
||||
});
|
||||
if(ar.length == 0){
|
||||
|
@ -1294,7 +1294,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
.show();
|
||||
}
|
||||
helper.close();
|
||||
favoritesLayer.reloadFavorites();
|
||||
favoritesLayer.reloadFavorites(MapActivity.this);
|
||||
}
|
||||
});
|
||||
builder.create().show();
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.osmand.views;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
|
@ -71,7 +72,7 @@ public class FavoritesLayer implements OsmandMapLayer {
|
|||
paintBlack.setStrokeWidth(2);
|
||||
|
||||
pixRect.set(0, 0, view.getWidth(), view.getHeight());
|
||||
reloadFavorites();
|
||||
reloadFavorites(view.getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,8 +80,8 @@ public class FavoritesLayer implements OsmandMapLayer {
|
|||
|
||||
}
|
||||
|
||||
public void reloadFavorites(){
|
||||
FavouritesDbHelper helper = new FavouritesActivity.FavouritesDbHelper(view.getContext());
|
||||
public void reloadFavorites(Context ctx){
|
||||
FavouritesDbHelper helper = new FavouritesActivity.FavouritesDbHelper(ctx);
|
||||
favouritePoints = helper.getFavouritePoints();
|
||||
helper.close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue