Fixed issue with Destination point description shows multiple times
This commit is contained in:
parent
a7156dd362
commit
e62041ed67
1 changed files with 5 additions and 1 deletions
|
@ -348,8 +348,12 @@ public class MapActivityActions implements DialogProvider {
|
||||||
standardId == R.string.context_menu_item_destination_point) {
|
standardId == R.string.context_menu_item_destination_point) {
|
||||||
boolean dest = standardId == R.string.context_menu_item_destination_point;
|
boolean dest = standardId == R.string.context_menu_item_destination_point;
|
||||||
String selected = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObjectName();
|
String selected = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObjectName();
|
||||||
|
String target = null;
|
||||||
|
if(dest && selected != null){
|
||||||
|
target = selected.replaceAll(getString(R.string.context_menu_item_destination_point), "");
|
||||||
|
}
|
||||||
targets.navigateToPoint(new LatLon(latitude, longitude), true,
|
targets.navigateToPoint(new LatLon(latitude, longitude), true,
|
||||||
dest ? -1 : targets.getIntermediatePoints().size(), selected);
|
dest ? -1 : targets.getIntermediatePoints().size(), dest? target : selected);
|
||||||
if(targets.getIntermediatePoints().size() > 0) {
|
if(targets.getIntermediatePoints().size() > 0) {
|
||||||
openIntermediatePointsDialog();
|
openIntermediatePointsDialog();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue