From fc36e24172f2a40e97f0daeb23645e476d3764d0 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 10 Oct 2015 11:55:35 +0300 Subject: [PATCH] Open context menu on show favorite on map action --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 33af97c33a..a27308683c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -38,6 +38,7 @@ import net.osmand.access.AccessibleActivity; import net.osmand.access.AccessibleToast; import net.osmand.access.MapAccessibilityActions; import net.osmand.core.android.AtlasMapRendererView; +import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.QuadPoint; @@ -545,8 +546,12 @@ public class MapActivity extends AccessibleActivity { } if (mapLabelToShow != null) { mapLayers.getContextMenuLayer().setSelectedObject(toShow); - mapLayers.getContextMenuLayer().setLocation(latLonToShow, - mapLabelToShow.getFullPlainName(this)); + if (toShow instanceof FavouritePoint) { + mapLayers.getContextMenuLayer().showContextMenuForSelectedObjects(latLonToShow); + } else { + mapLayers.getContextMenuLayer().setLocation(latLonToShow, + mapLabelToShow.getFullPlainName(this)); + } } if (!latLonToShow.equals(cur)) { mapView.getAnimatedDraggingThread().startMoving(latLonToShow.getLatitude(),