From 50192251bb0f92385ae13a929210ee5fb0786695 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Jan 2020 19:06:04 +0200 Subject: [PATCH] Fix local name in favorite point menu controller --- .../other/FavouritesBottomSheetMenuFragment.java | 6 +++--- .../routepreparationmenu/AddPointBottomSheetDialog.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java index 2fad28e8c0..5d690e2e69 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java @@ -152,13 +152,13 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag LatLon ll = new LatLon(point.getLatitude(), point.getLongitude()); switch (pointType) { case START: - targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(mapActivity)); + targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(requireActivity())); break; case TARGET: - targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(mapActivity)); + targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(requireActivity())); break; case INTERMEDIATE: - targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(mapActivity)); + targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(requireActivity())); break; case HOME: favorites.setSpecialPoint(ll, FavouritePoint.SpecialPointType.HOME, null); diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java index ffb62da631..d3af9bbb65 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java @@ -474,7 +474,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment { if (item instanceof FavouritePoint) { FavouritePoint point = (FavouritePoint) item; ll = new LatLon(point.getLatitude(), point.getLongitude()); - name = point.getPointDescription(mapActivity); + name = point.getPointDescription(requireActivity()); } else if (item instanceof PointType) { MapActivity mapActivity = (MapActivity) getActivity(); if (mapActivity != null) {