From 1eb4e70d5f2753cf7b59da1a49ca9aa9b48f4a7d Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 8 Jul 2016 14:23:04 +0300 Subject: [PATCH] Fix #2689 --- OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java index 1a34060a2e..f7a2b0ff7f 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java @@ -510,12 +510,14 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable public static void combineStandardPoiFilters(Set filters, OsmandApplication app) { Set standardFilters = new TreeSet<>(); for (PoiUIFilter filter : filters) { - if ((filter.isStandardFilter() && filter.filterId.startsWith(PoiUIFilter.STD_PREFIX)) - || filter.filterId.startsWith(PoiUIFilter.CUSTOM_FILTER_ID)) { + if (((filter.isStandardFilter() && filter.filterId.startsWith(PoiUIFilter.STD_PREFIX)) + || filter.filterId.startsWith(PoiUIFilter.CUSTOM_FILTER_ID)) + && (filter.getFilterByName() == null) + && (filter.getSavedFilterByName() == null)) { standardFilters.add(filter); } } - if (!standardFilters.isEmpty()) { + if (standardFilters.size() > 1) { PoiUIFilter standardFiltersCombined = new PoiUIFilter(standardFilters, app); filters.removeAll(standardFilters); filters.add(standardFiltersCombined);