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();
|
String description = Algorithms.isEmpty(getDescriptionTextValue()) ? null : getDescriptionTextValue();
|
||||||
if (editor.isNew()) {
|
if (editor.isNew()) {
|
||||||
doAddWpt(name, category, description);
|
doAddWpt(name, category, description);
|
||||||
|
wpt = getWpt();
|
||||||
} else {
|
} else {
|
||||||
doUpdateWpt(name, category, description);
|
doUpdateWpt(name, category, description);
|
||||||
}
|
}
|
||||||
|
@ -222,7 +223,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
||||||
}
|
}
|
||||||
|
|
||||||
MapContextMenu menu = mapActivity.getContextMenu();
|
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());
|
LatLon latLon = new LatLon(wpt.getLatitude(), wpt.getLongitude());
|
||||||
if (menu.getLatLon().equals(latLon)) {
|
if (menu.getLatLon().equals(latLon)) {
|
||||||
menu.update(latLon, new WptLocationPoint(wpt).getPointDescription(mapActivity), wpt);
|
menu.update(latLon, new WptLocationPoint(wpt).getPointDescription(mapActivity), wpt);
|
||||||
|
|
Loading…
Reference in a new issue