Introduce additional menu item for set destnation

This commit is contained in:
Victor Shcherb 2013-08-10 20:14:05 +02:00
parent af053235dd
commit 379f60d687

View file

@ -905,6 +905,8 @@ public class MapActivityActions implements DialogProvider {
final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
final OsmandSettings settings = getMyApplication().getSettings();
if(targets.getPointToNavigate() != null) {
adapter.item(R.string.context_menu_item_destination_point).icons(R.drawable.ic_action_flag_dark,
R.drawable.ic_action_flag_light).reg();
adapter.item(R.string.context_menu_item_intermediate_point).icons(R.drawable.ic_action_flage_dark,
R.drawable.ic_action_flage_light).reg();
// For button-less search UI
@ -974,7 +976,9 @@ public class MapActivityActions implements DialogProvider {
}
targets.navigateToPoint(new LatLon(latitude, longitude), true,
dest ? -1 : targets.getIntermediatePoints().size(), selected);
if(targets.getIntermediatePoints().size() > 0) {
IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity);
}
} else if (standardId == R.string.context_menu_item_share_location) {
shareLocation(latitude, longitude, mapActivity.getMapView().getZoom());
} else if (standardId == R.string.context_menu_item_add_favorite) {