fix adding unnamed waypoints to favorites

This commit is contained in:
Skalii 2021-02-23 01:42:59 +02:00
parent 80dd042f4f
commit 627cd967b1

View file

@ -673,6 +673,9 @@ 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) {
p.name = Algorithms.getFileNameWithoutExtension(fileName);
}
if (p.name != null) {
final String fpCat;
if (p.category == null) {