Fix "Any edits of the group name don't affect for a future group"
This commit is contained in:
parent
1114a91be7
commit
884e9135df
2 changed files with 8 additions and 2 deletions
|
@ -371,8 +371,13 @@ public class FavouritePoint implements Serializable, LocationPoint {
|
|||
}
|
||||
|
||||
public static FavouritePoint fromWpt(@NonNull WptPt pt, @NonNull Context ctx) {
|
||||
return fromWpt(pt, ctx, null);
|
||||
}
|
||||
|
||||
public static FavouritePoint fromWpt(@NonNull WptPt pt, @NonNull Context ctx, String category) {
|
||||
String name = pt.name;
|
||||
String categoryName = pt.category != null ? pt.category : "";
|
||||
String categoryName = category != null ? category :
|
||||
(pt.category != null ? pt.category : "");
|
||||
if (name == null) {
|
||||
name = "";
|
||||
}
|
||||
|
|
|
@ -622,7 +622,8 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
FavouritesDbHelper fdb = app.getFavorites();
|
||||
for (GpxDisplayItem i : getSelectedItems()) {
|
||||
if (i.locationStart != null) {
|
||||
FavouritePoint fp = FavouritePoint.fromWpt(i.locationStart, app);
|
||||
FavouritePoint fp = FavouritePoint.fromWpt(
|
||||
i.locationStart, app, editText.getText().toString());
|
||||
if (!Algorithms.isEmpty(i.description)) {
|
||||
fp.setDescription(i.description);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue