ItemizedLayer: Added a check that prevents Gestures from being processed if the Layer is not enabled (#754)

This commit is contained in:
Carlos Alberto Martínez Gadea 2019-12-03 14:23:32 +01:00 committed by Emux
parent 6f697ed6f8
commit 49d1e7bafc
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3

View File

@ -5,6 +5,7 @@
* Copyright 2016-2019 devemux86
* Copyright 2016 Stephan Leuschner
* Copyright 2016 Pedinel
* Copyright 2019 Carlos Alberto Martínez Gadea
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -264,6 +265,9 @@ public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Ite
@Override
public boolean onGesture(Gesture g, MotionEvent e) {
if (!isEnabled())
return false;
if (g instanceof Gesture.Tap)
return activateSelectedItems(e, mActiveItemSingleTap);