From e2bc3b9221bba44039abaa311137b8f7bbb9f9c0 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 21 Oct 2015 12:56:04 +0200 Subject: [PATCH] fix --- .../net/osmand/plus/activities/FavoritesTreeFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 4603114e71..26557be20b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -514,10 +514,13 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { public void onClick(DialogInterface dialog, int which) { int clr = list.get(colorSpinner.getSelectedItemPosition()); String name = nameEditText.getText().toString(); - if (clr != intColor || group.visible != checkBox.isChecked() || - !Algorithms.objectEquals(group.name, name)) { + boolean nameChanged = !Algorithms.objectEquals(group.name, name); + if (clr != intColor || group.visible != checkBox.isChecked() || nameChanged) { getMyApplication().getFavorites().editFavouriteGroup(group, name, clr, checkBox.isChecked()); + if(nameChanged) { + favouritesAdapter.synchronizeGroups(); + } favouritesAdapter.notifyDataSetInvalidated(); }