Fix snap to road title change
This commit is contained in:
parent
7f03ce321b
commit
fc7d91e494
1 changed files with 6 additions and 4 deletions
|
@ -480,10 +480,12 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
return iconsCache.getIcon(id, nightMode ? R.color.osmand_orange : R.color.color_myloc_distance);
|
return iconsCache.getIcon(id, nightMode ? R.color.osmand_orange : R.color.color_myloc_distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showSnapToRoadMenu() {
|
private void showSnapToRoadMenu(boolean rememberPreviousTitle) {
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
previousToolBarTitle = toolBarController.getTitle();
|
if (rememberPreviousTitle) {
|
||||||
|
previousToolBarTitle = toolBarController.getTitle();
|
||||||
|
}
|
||||||
toolBarController.setTitle(getString(R.string.snap_to_road));
|
toolBarController.setTitle(getString(R.string.snap_to_road));
|
||||||
mapActivity.refreshMap();
|
mapActivity.refreshMap();
|
||||||
SnapToRoadBottomSheetDialogFragment fragment = new SnapToRoadBottomSheetDialogFragment();
|
SnapToRoadBottomSheetDialogFragment fragment = new SnapToRoadBottomSheetDialogFragment();
|
||||||
|
@ -501,7 +503,7 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public void snapToRoadOnCLick() {
|
public void snapToRoadOnCLick() {
|
||||||
if (!snapToRoadEnabled) {
|
if (!snapToRoadEnabled) {
|
||||||
showSnapToRoadMenu();
|
showSnapToRoadMenu(true);
|
||||||
} else {
|
} else {
|
||||||
disableSnapToRoadMode();
|
disableSnapToRoadMode();
|
||||||
}
|
}
|
||||||
|
@ -717,7 +719,7 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
snapToRoadBtn.setOnClickListener(new View.OnClickListener() {
|
snapToRoadBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
showSnapToRoadMenu();
|
showSnapToRoadMenu(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
snapToRoadBtn.setVisibility(View.VISIBLE);
|
snapToRoadBtn.setVisibility(View.VISIBLE);
|
||||||
|
|
Loading…
Reference in a new issue