From 2fe7debf052cc2b41d127c77059d72ebe23fd65c Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Tue, 18 Sep 2018 20:09:39 +0300 Subject: [PATCH] Fix #5961 --- .../plus/mapcontextmenu/MapContextMenuFragment.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index d9e479a1c6..33416d5aad 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -124,7 +124,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo private OsmandMapTileView map; private LatLon mapCenter; - private int mapZoom; private int origMarkerX; private int origMarkerY; private boolean customMapCenter; @@ -202,10 +201,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo origMarkerX = box.getCenterPixelX(); origMarkerY = box.getCenterPixelY(); } - mapZoom = menu.getMapZoom(); - if (mapZoom == 0) { - mapZoom = map.getZoom(); - } // Left title button final View leftTitleButtonView = view.findViewById(R.id.title_button_view); @@ -1247,13 +1242,8 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo super.onDestroyView(); if (!menu.isActive()) { if (mapCenter != null) { - if (mapZoom == 0) { - mapZoom = map.getZoom(); - } - //map.setLatLon(mapCenter.getLatitude(), mapCenter.getLongitude()); - //map.setIntZoom(mapZoom); AnimateDraggingMapThread thread = map.getAnimatedDraggingThread(); - thread.startMoving(mapCenter.getLatitude(), mapCenter.getLongitude(), mapZoom, true); + thread.startMoving(mapCenter.getLatitude(), mapCenter.getLongitude(), map.getZoom(), true); } } menu.setMapCenter(null);