fix replace checks;

This commit is contained in:
Skalii 2021-02-23 01:50:50 +02:00
parent 627cd967b1
commit 2561ee99e1

View file

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