diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java index cb17de6d00..d259de6de6 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java @@ -446,6 +446,18 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter 1) { + group.setWasShown(true); + Bundle args = new Bundle(); + args.putString(SelectWptCategoriesBottomSheetDialogFragment.GPX_FILE_PATH_KEY, group.getGpxPath()); + args.putString(SelectWptCategoriesBottomSheetDialogFragment.ACTIVE_CATEGORIES_KEY, group.getWptCategoriesString()); + args.putBoolean(SelectWptCategoriesBottomSheetDialogFragment.UPDATE_CATEGORIES_KEY, true); + + SelectWptCategoriesBottomSheetDialogFragment fragment = new SelectWptCategoriesBottomSheetDialogFragment(); + fragment.setArguments(args); + fragment.setUsedOnMap(false); + fragment.show(mapActivity.getSupportFragmentManager(), SelectWptCategoriesBottomSheetDialogFragment.TAG); + } mapMarkersHelper.updateGroupDisabled(group, disabled); if (group.getType() == MapMarkersGroup.GPX_TYPE) { group.setVisibleUntilRestart(disabled); @@ -458,18 +470,6 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter 1) { - group.setWasShown(true); - Bundle args = new Bundle(); - args.putString(SelectWptCategoriesBottomSheetDialogFragment.GPX_FILE_PATH_KEY, group.getGpxPath()); - args.putString(SelectWptCategoriesBottomSheetDialogFragment.ACTIVE_CATEGORIES_KEY, group.getWptCategoriesString()); - args.putBoolean(SelectWptCategoriesBottomSheetDialogFragment.UPDATE_CATEGORIES_KEY, true); - - SelectWptCategoriesBottomSheetDialogFragment fragment = new SelectWptCategoriesBottomSheetDialogFragment(); - fragment.setArguments(args); - fragment.setUsedOnMap(false); - fragment.show(mapActivity.getSupportFragmentManager(), SelectWptCategoriesBottomSheetDialogFragment.TAG); - } } if(!disabled) { mapMarkersHelper.enableGroup(group);