Fix profile button and formatting

This commit is contained in:
Dima-1 2020-08-21 14:18:06 +03:00
parent 872d7b5adf
commit ac6a57dd10
2 changed files with 14 additions and 6 deletions

View file

@ -310,16 +310,16 @@ public class MeasurementEditingContext {
public void clearBeforeSegments() {
before.points.clear();
if (beforeCacheForSnap != null) {
beforeCacheForSnap.points.clear();
}
if (beforeCacheForSnap != null) {
beforeCacheForSnap.points.clear();
}
}
public void clearAfterSegments() {
after.points.clear();
if (afterCacheForSnap != null) {
afterCacheForSnap.points.clear();
}
if (afterCacheForSnap != null) {
afterCacheForSnap.points.clear();
}
}
public boolean isFirstPointSelected() {

View file

@ -1033,6 +1033,13 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
}
private void hideSnapToRoadIcon() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
mapActivity.findViewById(R.id.snap_to_road_image_button).setVisibility(View.GONE);
}
}
private void displayRoutePoints() {
MeasurementToolLayer measurementLayer = getMeasurementLayer();
GPXFile gpx = editingCtx.getNewGpxData().getGpxFile();
@ -1755,6 +1762,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
hidePointsList();
}
resetAppMode();
hideSnapToRoadIcon();
if (!editingCtx.isNewData() && !planRouteMode) {
GPXFile gpx = editingCtx.getNewGpxData().getGpxFile();
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization().getTrackActivity());