Fix #2689
This commit is contained in:
parent
b4fa964158
commit
1eb4e70d5f
1 changed files with 5 additions and 3 deletions
|
@ -510,12 +510,14 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
|
||||||
public static void combineStandardPoiFilters(Set<PoiUIFilter> filters, OsmandApplication app) {
|
public static void combineStandardPoiFilters(Set<PoiUIFilter> filters, OsmandApplication app) {
|
||||||
Set<PoiUIFilter> standardFilters = new TreeSet<>();
|
Set<PoiUIFilter> standardFilters = new TreeSet<>();
|
||||||
for (PoiUIFilter filter : filters) {
|
for (PoiUIFilter filter : filters) {
|
||||||
if ((filter.isStandardFilter() && filter.filterId.startsWith(PoiUIFilter.STD_PREFIX))
|
if (((filter.isStandardFilter() && filter.filterId.startsWith(PoiUIFilter.STD_PREFIX))
|
||||||
|| filter.filterId.startsWith(PoiUIFilter.CUSTOM_FILTER_ID)) {
|
|| filter.filterId.startsWith(PoiUIFilter.CUSTOM_FILTER_ID))
|
||||||
|
&& (filter.getFilterByName() == null)
|
||||||
|
&& (filter.getSavedFilterByName() == null)) {
|
||||||
standardFilters.add(filter);
|
standardFilters.add(filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!standardFilters.isEmpty()) {
|
if (standardFilters.size() > 1) {
|
||||||
PoiUIFilter standardFiltersCombined = new PoiUIFilter(standardFilters, app);
|
PoiUIFilter standardFiltersCombined = new PoiUIFilter(standardFilters, app);
|
||||||
filters.removeAll(standardFilters);
|
filters.removeAll(standardFilters);
|
||||||
filters.add(standardFiltersCombined);
|
filters.add(standardFiltersCombined);
|
||||||
|
|
Loading…
Reference in a new issue