From 50aabf397ff1330140f3132c14b04629d40c3c9a Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 14 Apr 2015 22:00:12 +0200 Subject: [PATCH] fix search --- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index c4394293e5..32bdecfd00 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -268,6 +268,9 @@ public class MapActivityLayers { builder.setAdapter(listAdapter, new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int which) { + if (which == 0) { + which = list.size() + 1 + } PoiLegacyFilter pf = list.get(which - 1); String filterId = pf.getFilterId(); if(filterId.equals(PoiLegacyFilter.CUSTOM_FILTER_ID)){