Do not show navigation when the route is already being calculated

This commit is contained in:
vshcherb 2013-08-17 11:25:57 +02:00
parent e75a1b1dae
commit ca04fe9415

View file

@ -1142,7 +1142,8 @@ public class MapActivityActions implements DialogProvider {
} }
}).reg(); }).reg();
} }
optionsMenuHelper.item(routingHelper.isRouteCalculated() ? R.string.show_route: R.string.get_directions) if(!routingHelper.isRouteBeingCalculated() || routingHelper.isRouteCalculated()) {
optionsMenuHelper.item(routingHelper.isRouteCalculated() ? R.string.show_route: R.string.get_directions)
.icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light) .icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light)
.listen(new OnContextMenuClick() { .listen(new OnContextMenuClick() {
@Override @Override
@ -1157,6 +1158,7 @@ public class MapActivityActions implements DialogProvider {
} }
} }
}).reg(); }).reg();
}
if (getTargets().getPointToNavigate() != null) { if (getTargets().getPointToNavigate() != null) {
optionsMenuHelper.item(R.string.target_points).icons(R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_light) optionsMenuHelper.item(R.string.target_points).icons(R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_light)
.listen(new OnContextMenuClick() { .listen(new OnContextMenuClick() {