Loaded favorites

This commit is contained in:
Victor Shcherb 2015-10-06 10:04:51 +03:00
parent eb2a587e5f
commit 989cdae822

View file

@ -512,10 +512,13 @@ public class FavouritesDbHelper {
} }
private String loadGPXFile(File file, Map<String, FavouritePoint> points) { private boolean loadGPXFile(File file, Map<String, FavouritePoint> points) {
if(!file.exists()) {
return false;
}
GPXFile res = GPXUtilities.loadGPXFile(context, file); GPXFile res = GPXUtilities.loadGPXFile(context, file);
if (res.warning != null) { if (res.warning != null) {
return res.warning; return false;
} }
for (WptPt p : res.points) { for (WptPt p : res.points) {
int c; int c;
@ -535,7 +538,7 @@ public class FavouritesDbHelper {
fp.setVisible(!p.getExtensionsToRead().containsKey(HIDDEN)); fp.setVisible(!p.getExtensionsToRead().containsKey(HIDDEN));
points.put(getKey(fp), fp); points.put(getKey(fp), fp);
} }
return null; return true;
} }
public void editFavouriteGroup(FavoriteGroup group, String newName, int color, boolean visible) { public void editFavouriteGroup(FavoriteGroup group, String newName, int color, boolean visible) {