Fix issue with select all
This commit is contained in:
parent
3aa35b1381
commit
004a44b073
4 changed files with 6 additions and 6 deletions
|
@ -197,7 +197,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
|
|||
helper.editPoiFilter(filter);
|
||||
ListView lv = this.getListView();
|
||||
AmenityAdapter la = this.getListAdapter();
|
||||
la.notifyDataSetInvalidated();
|
||||
la.notifyDataSetChanged();
|
||||
return lv;
|
||||
}
|
||||
|
||||
|
@ -207,6 +207,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
|
|||
for (int i = 0; i < count; i++) {
|
||||
selectAllFromCategory(adapter.getItem(i));
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private void deselectAll(){
|
||||
|
|
|
@ -345,7 +345,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
PoiUIFilter custom = getMyApplication().getPoiFilters().getCustomPOIFilter();
|
||||
custom.updateTypesToAccept(f);
|
||||
custom.replaceWithPoiFilter(f);
|
||||
showEditActivity(custom);
|
||||
return true;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
this.filter.setFilterByName(null);
|
||||
}
|
||||
} else {
|
||||
this.filter.updateTypesToAccept(custom);
|
||||
this.filter.replaceWithPoiFilter(custom);
|
||||
}
|
||||
filter.clearPreviousZoom();
|
||||
// run query again
|
||||
|
|
|
@ -194,6 +194,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc
|
|||
} else {
|
||||
custom.setFilterByName(null);
|
||||
}
|
||||
custom.clearFilter();
|
||||
custom.updateTypesToAccept(((AbstractPoiType) item));
|
||||
showFilterActivity(custom.getFilterId());
|
||||
}
|
||||
|
|
|
@ -449,9 +449,7 @@ public class PoiUIFilter implements SearchPoiTypeFilter {
|
|||
|
||||
|
||||
public void updateTypesToAccept(AbstractPoiType pt) {
|
||||
acceptedTypes.clear();
|
||||
pt.putTypes(acceptedTypes);
|
||||
poiAdditionals.clear();
|
||||
if (pt instanceof PoiType && ((PoiType) pt).isAdditional() && ((PoiType) pt).getParentType() != null) {
|
||||
fillPoiAdditionals(((PoiType) pt).getParentType());
|
||||
} else {
|
||||
|
@ -488,7 +486,7 @@ public class PoiUIFilter implements SearchPoiTypeFilter {
|
|||
}
|
||||
}
|
||||
|
||||
public void updateTypesToAccept(PoiUIFilter f) {
|
||||
public void replaceWithPoiFilter(PoiUIFilter f) {
|
||||
acceptedTypes.clear();
|
||||
acceptedTypes.putAll(f.acceptedTypes);
|
||||
poiAdditionals.clear();
|
||||
|
|
Loading…
Reference in a new issue