diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index 8b38d111e5..02f5f3df15 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -132,6 +132,10 @@ public class ParkingPositionPlugin extends OsmandPlugin { parkingEvent.resetToDefault(); parkingStartTime.resetToDefault(); parkingPosition = null; + FavouritePoint pnt = app.getFavorites().getSpecialPoint(SpecialPointType.PARKING); + if (pnt != null) { + app.getFavorites().deleteFavourite(pnt); + } return true; } @@ -372,7 +376,6 @@ public class ParkingPositionPlugin extends OsmandPlugin { } else { addOrRemoveParkingEvent(false); } - app.getFavorites().setSpecialPoint(getParkingPosition(), SpecialPointType.PARKING, null); showContextMenuIfNeeded(mapActivity, false); } }); diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java index 0c1ba98b9a..ae819b460c 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java @@ -72,10 +72,10 @@ public class ParkingTypeBottomSheetDialogFragment extends MenuBottomSheetDialogF plugin.setParkingPosition(latitude, longitude, false); plugin.showContextMenuIfNeeded(mapActivity, true); - mapActivity.getMyApplication().getFavorites().setSpecialPoint( - plugin.getParkingPosition(), SpecialPointType.PARKING, null); mapActivity.refreshMap(); } + mapActivity.getMyApplication().getFavorites().setSpecialPoint( + plugin.getParkingPosition(), SpecialPointType.PARKING, null); } dismiss(); }