Make context menu marker non-movable

This commit is contained in:
alex 2018-02-23 11:28:59 +02:00
parent c61f0ef63d
commit 48ef9256e2

View file

@ -300,9 +300,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
} }
public boolean isObjectMoveable(Object o) { public boolean isObjectMoveable(Object o) {
if (o == null) { if (o != null && selectedObjectContextMenuProvider != null
return true;
} else if (selectedObjectContextMenuProvider != null
&& selectedObjectContextMenuProvider instanceof ContextMenuLayer.IMoveObjectProvider) { && selectedObjectContextMenuProvider instanceof ContextMenuLayer.IMoveObjectProvider) {
final IMoveObjectProvider l = (ContextMenuLayer.IMoveObjectProvider) selectedObjectContextMenuProvider; final IMoveObjectProvider l = (ContextMenuLayer.IMoveObjectProvider) selectedObjectContextMenuProvider;
if (l.isObjectMovable(o)) { if (l.isObjectMovable(o)) {