Fix 'Open track' button of newly created Waypoint
This commit is contained in:
parent
513cce6304
commit
7c9bdb70f1
1 changed files with 2 additions and 1 deletions
|
@ -213,6 +213,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
|||
String description = Algorithms.isEmpty(getDescriptionTextValue()) ? null : getDescriptionTextValue();
|
||||
if (editor.isNew()) {
|
||||
doAddWpt(name, category, description);
|
||||
wpt = getWpt();
|
||||
} else {
|
||||
doUpdateWpt(name, category, description);
|
||||
}
|
||||
|
@ -222,7 +223,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
|||
}
|
||||
|
||||
MapContextMenu menu = mapActivity.getContextMenu();
|
||||
if (menu.getLatLon() != null && menu.isActive()) {
|
||||
if (menu.getLatLon() != null && menu.isActive() && wpt != null) {
|
||||
LatLon latLon = new LatLon(wpt.getLatitude(), wpt.getLongitude());
|
||||
if (menu.getLatLon().equals(latLon)) {
|
||||
menu.update(latLon, new WptLocationPoint(wpt).getPointDescription(mapActivity), wpt);
|
||||
|
|
Loading…
Reference in a new issue