simplify by removing one dialogue

This commit is contained in:
sonora 2013-06-12 23:59:20 +02:00
parent d41c362fa1
commit bc18a229b9
3 changed files with 8 additions and 12 deletions

View file

@ -801,15 +801,13 @@ public class MapActivityActions implements DialogProvider {
getDirections(loc, null, true); getDirections(loc, null, true);
} }
} else if (standardId == R.string.context_menu_item_intermediate_point) { } else if (standardId == R.string.context_menu_item_intermediate_point) {
// Issue 1929 TODO: show navigatePointDialog(if needed), then IntermediatePointDialog, but without subsequent Directions: // Issue 1929: Consistently show IntermediatePointDialog, without subsequent Directions screen
//targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size()); targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size());
navigatePointDialogAndLaunchMap(mapActivity, latitude, longitude, null);
IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity);
// For button-less search UI // For button-less search UI
} else if (standardId == R.string.context_menu_item_destination_point) { } else if (standardId == R.string.context_menu_item_destination_point) {
// Issue 1929 TODO: show navigatePointDialog(if needed), then IntermediatePointDialog, but without subsequent Directions: // Issue 1929: Consistently show IntermediatePointDialog, without subsequent Directions screen
//targets.navigateToPoint(new LatLon(latitude, longitude), true, -1); targets.navigateToPoint(new LatLon(latitude, longitude), true, -1);
navigatePointDialogAndLaunchMap(mapActivity, latitude, longitude, null);
IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity);
} else if (standardId == R.string.context_menu_item_share_location) { } else if (standardId == R.string.context_menu_item_share_location) {
shareLocation(latitude, longitude, mapActivity.getMapView().getZoom()); shareLocation(latitude, longitude, mapActivity.getMapView().getZoom());
@ -1309,16 +1307,14 @@ public class MapActivityActions implements DialogProvider {
settings.insertIntermediatePoint(lat, lon, name, 0, false); settings.insertIntermediatePoint(lat, lon, name, 0, false);
} }
targetPointsHelper.updatePointsFromSettings(); targetPointsHelper.updatePointsFromSettings();
// Issue 1929 TODO: call IntermediatePointDialog from here(?) MapActivity.launchMapActivityMoveToTop(act);
//MapActivity.launchMapActivityMoveToTop(act);
} }
}); });
builder.show(); builder.show();
} else { } else {
settings.setPointToNavigate(lat, lon, false, name); settings.setPointToNavigate(lat, lon, false, name);
targetPointsHelper.updatePointsFromSettings(); targetPointsHelper.updatePointsFromSettings();
// Issue 1929 TODO: call IntermediatePointDialog from here(?) MapActivity.launchMapActivityMoveToTop(act);
//MapActivity.launchMapActivityMoveToTop(act);
} }
} }

View file

@ -259,8 +259,8 @@ public class NavigatePointFragment extends SherlockFragment implements SearchAct
targetPointsHelper.setSingleDestination(lat, lon, getString(R.string.point_on_map, lat, lon)); targetPointsHelper.setSingleDestination(lat, lon, getString(R.string.point_on_map, lat, lon));
MapActivity.launchMapActivityMoveToTop(getActivity()); MapActivity.launchMapActivityMoveToTop(getActivity());
} else if (mode == ADD_WAYPOINT) { } else if (mode == ADD_WAYPOINT) {
// Issue 1929 TODO: show IntermediatePointsDialog here instead of navigatePointDialog, without subsequent Directions
MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), lat, lon, getString(R.string.point_on_map, lat, lon)); MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), lat, lon, getString(R.string.point_on_map, lat, lon));
// Issue 1929 TODO: show IntermediatePointsDialog now, but without subsequent Directions
} else if (mode == SHOW_ON_MAP){ } else if (mode == SHOW_ON_MAP){
OsmandApplication app = (OsmandApplication) getActivity().getApplication(); OsmandApplication app = (OsmandApplication) getActivity().getApplication();
app.getSettings().setMapLocationToShow(lat, lon, Math.max(12, app.getSettings().getLastKnownMapZoom()), app.getSettings().setMapLocationToShow(lat, lon, Math.max(12, app.getSettings().getLastKnownMapZoom()),

View file

@ -296,8 +296,8 @@ public class SearchAddressFragment extends SherlockFragment {
targetPointsHelper.setSingleDestination(searchPoint.getLatitude(), searchPoint.getLongitude(), historyName); targetPointsHelper.setSingleDestination(searchPoint.getLatitude(), searchPoint.getLongitude(), historyName);
MapActivity.launchMapActivityMoveToTop(getActivity()); MapActivity.launchMapActivityMoveToTop(getActivity());
} else if (mode == ADD_WAYPOINT) { } else if (mode == ADD_WAYPOINT) {
// Issue 1929 TODO: show IntermediatePointsDialog here instead of navigatePointDialog, without subsequent Directions
MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), searchPoint.getLatitude(), searchPoint.getLongitude(), historyName); MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), searchPoint.getLatitude(), searchPoint.getLongitude(), historyName);
// Issue 1929 TODO: show IntermediatePointsDialog now, but without subsequent Directions
} else if (mode == SHOW_ON_MAP) { } else if (mode == SHOW_ON_MAP) {
osmandSettings.setMapLocationToShow(searchPoint.getLatitude(), searchPoint.getLongitude(), zoom, historyName); osmandSettings.setMapLocationToShow(searchPoint.getLatitude(), searchPoint.getLongitude(), zoom, historyName);
MapActivity.launchMapActivityMoveToTop(getActivity()); MapActivity.launchMapActivityMoveToTop(getActivity());