From a359f2b7ceebe215193d61b8c424a541ffa072dc Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 27 Aug 2015 17:29:12 +0300 Subject: [PATCH] Fixed bug with tag deletion --- .../src/net/osmand/plus/osmedit/AdvancedDataFragment.java | 6 +++++- OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java index a100a3d17c..0545954392 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java @@ -188,10 +188,14 @@ public class AdvancedDataFragment extends Fragment { deleteItemImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + LOG.debug("onClick(" + "v=" + v + ") tag=" + tag + + "; editPoiData.tags" + editPoiData.tags); linearLayout.removeView((View) v.getParent()); editPoiData.tags.remove(tag); + LOG.debug("editPoiData.tags" + editPoiData.tags + " mIsUserInput=" + mIsUserInput); if (mIsUserInput) - editPoiData.notifyDatasetChanged(mTagsChangedListener); + editPoiData.notifyDatasetChanged(null); + LOG.debug("editPoiData.tags" + editPoiData.tags); } }); tagEditText.addTextChangedListener(new TextWatcher() { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java index a50f95559b..d616d5c0a6 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java @@ -225,7 +225,8 @@ public class BasicDataFragment extends Fragment { @Override public void onUntriggered() { - + adapter.replaceOpeningHours(new OpeningHoursParser.OpeningHours()); + adapter.updateViews(); } }