From 48ef9256e2d6b7eb87273cba5b4a42efffeb8e30 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 23 Feb 2018 11:28:59 +0200 Subject: [PATCH] Make context menu marker non-movable --- OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index 54d8b24d86..b4a2bd7eca 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -300,9 +300,7 @@ public class ContextMenuLayer extends OsmandMapLayer { } public boolean isObjectMoveable(Object o) { - if (o == null) { - return true; - } else if (selectedObjectContextMenuProvider != null + if (o != null && selectedObjectContextMenuProvider != null && selectedObjectContextMenuProvider instanceof ContextMenuLayer.IMoveObjectProvider) { final IMoveObjectProvider l = (ContextMenuLayer.IMoveObjectProvider) selectedObjectContextMenuProvider; if (l.isObjectMovable(o)) {