From f261ae846932c5fedd40a901af349b118afda304 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Sun, 24 Nov 2013 18:17:49 +0100 Subject: [PATCH] Fix exception of selecting sightseeing layer --- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index b889ffabfc..aad47482f7 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -589,7 +589,7 @@ public class MapActivityLayers { String filterId; if (which == 0) { filterId = PoiFiltersHelper.getOsmDefinedFilterId(null); - } else if (which <= userDefined.size()) { + } else if (which <= userDefined.size() + 1) { filterId = userDefined.get(which - 2).getFilterId(); } else { filterId = PoiFiltersHelper.getOsmDefinedFilterId(AmenityType.values()[which - userDefined.size() - 2]);