From ec690e15489a511c1e94754a877021ef18be1b58 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Fri, 21 Aug 2020 12:57:35 +0300 Subject: [PATCH] Remove Change route type --- .../MeasurementToolFragment.java | 1 + ...electedPointBottomSheetDialogFragment.java | 40 ------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index f7fa333906..ebab5fe724 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -782,6 +782,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route editingCtx.setSelectedPointPosition(-1); editingCtx.splitSegments(editingCtx.getBeforePoints().size() + editingCtx.getAfterPoints().size()); updateUndoRedoButton(false, redoBtn); + updateUndoRedoButton(true, undoBtn); updateDistancePointsText(); saved = false; } diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java index bfa1e51df6..cbdbf126ca 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SelectedPointBottomSheetDialogFragment.java @@ -157,46 +157,6 @@ public class SelectedPointBottomSheetDialogFragment extends MenuBottomSheetDialo items.add(new OptionsDividerItem(getContext())); - BaseBottomSheetItem changeRouteTypeBefore = new BottomSheetItemWithDescription.Builder() - .setDescription(getDescription(true)) - .setIcon(getRouteTypeIcon(true)) - .setTitle(getString(R.string.plan_route_change_route_type_before)) - .setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp) - .setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Fragment targetFragment = getTargetFragment(); - if (targetFragment instanceof SelectedPointFragmentListener) { - ((SelectedPointFragmentListener) targetFragment).onChangeRouteTypeBefore(); - } - dismiss(); - } - }) - .setDisabled(editingCtx.isFirstPointSelected()) - .create(); - items.add(changeRouteTypeBefore); - - BaseBottomSheetItem changeRouteTypeAfter = new BottomSheetItemWithDescription.Builder() - .setDescription(getDescription(false)) - .setIcon(getRouteTypeIcon(false)) - .setTitle(getString(R.string.plan_route_change_route_type_after)) - .setLayoutId(R.layout.bottom_sheet_item_with_descr_pad_32dp) - .setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Fragment targetFragment = getTargetFragment(); - if (targetFragment instanceof SelectedPointFragmentListener) { - ((SelectedPointFragmentListener) targetFragment).onChangeRouteTypeAfter(); - } - dismiss(); - } - }) - .setDisabled(editingCtx.isLastPointSelected()) - .create(); - items.add(changeRouteTypeAfter); - - items.add(new OptionsDividerItem(getContext())); - BaseBottomSheetItem deleteItem = new SimpleBottomSheetItem.Builder() .setIcon(getIcon(R.drawable.ic_action_delete_dark, nightMode ? R.color.color_osm_edit_delete : R.color.color_osm_edit_delete))