POI multiselection: fix

This commit is contained in:
Roman Inflianskas 2016-04-23 21:01:03 +03:00
parent f26bb32956
commit f7a2fc1946

View file

@ -503,10 +503,15 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
}
}
if (!standardFilters.isEmpty()) {
PoiUIFilter standardFiltersCombined = new PoiUIFilter(
null, app, app.getPoiFilters().getFiltersName(standardFilters));
PoiUIFilter standardFiltersCombined = null;
for (PoiUIFilter f : standardFilters) {
standardFiltersCombined.combineWithPoiFilter(f);
if (standardFiltersCombined == null) {
standardFiltersCombined = f;
f.filterId = PoiUIFilter.STD_PREFIX + "combined";
f.name = app.getPoiFilters().getFiltersName(standardFilters);
} else {
standardFiltersCombined.combineWithPoiFilter(f);
}
}
filters.removeAll(standardFilters);
filters.add(standardFiltersCombined);