From 609c3f12db21558c117c3525246704b480c618fe Mon Sep 17 00:00:00 2001 From: sonora Date: Sat, 23 Jul 2016 23:33:46 +0200 Subject: [PATCH] Fix #2834 Case 2 --- .../src/net/osmand/plus/myplaces/SelectedGPXFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java index 44719bec1e..6bcc04e4be 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java @@ -251,8 +251,11 @@ public class SelectedGPXFragment extends OsmAndListFragment { FavouritesDbHelper fdb = app.getFavorites(); for(GpxDisplayItem i : modifiableList) { if (i.locationStart != null) { - FavouritePoint fp = new FavouritePoint(i.locationStart.lat, i.locationStart.lon, i.name, - category); + String description = (i.description != null) ? i.description : "" ; + FavouritePoint fp = new FavouritePoint(i.locationStart.lat, i.locationStart.lon, i.name, category); + if (!"".equals(description)) { + fp.setDescription(description); + } fdb.addFavourite(fp, false); } }