Merge pull request #10979 from osmandapp/fix_waypoints_after_import_gpx

Adding unnamed waypoints to favorites
This commit is contained in:
Vitaliy 2021-02-23 11:53:23 +02:00 committed by GitHub
commit fc3ead429c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -673,7 +673,10 @@ public class ImportHelper {
public static List<FavouritePoint> asFavourites(OsmandApplication app, List<WptPt> wptPts, String fileName, boolean forceImportFavourites) {
List<FavouritePoint> favourites = new ArrayList<>();
for (WptPt p : wptPts) {
if (p.name != null) {
if (Algorithms.isEmpty(p.name)) {
p.name = app.getResources().getString(R.string.shared_string_waypoint);
}
if (!Algorithms.isEmpty(p.name)) {
final String fpCat;
if (p.category == null) {
if (forceImportFavourites) {