From 917cd7740d0f1d1070247394e5c4506fe32204e1 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Fri, 25 Jan 2019 14:41:38 +0200 Subject: [PATCH] Bug fix - Delete selected favorites bug #6465 - fixed --- .../net/osmand/plus/activities/FavoritesTreeFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 276af19e10..49db772fc0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -32,6 +32,7 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.AndroidUtils; +import net.osmand.PlatformUtil; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -62,10 +63,11 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.commons.logging.Log; public class FavoritesTreeFragment extends OsmandExpandableListFragment { - + public final static Log log = PlatformUtil.getLog(FavoritesTreeFragment.class); public static final int SEARCH_ID = -1; // public static final int EXPORT_ID = 0; // public static final int IMPORT_ID = 1; @@ -948,7 +950,10 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { } else { Set set = favoritesSelected.get(group.name); if (set != null) { + groupsToDelete.remove(group); + getGroupPosition(group.name); set.remove(model); + favouritesAdapter.notifyDataSetInvalidated(); } } updateSelectionMode(actionMode);