Fix Changing POI category on an existing object has no impact
This commit is contained in:
parent
744b36b87c
commit
b2335175cf
2 changed files with 3 additions and 7 deletions
|
@ -51,6 +51,8 @@ public class EditPoiData {
|
||||||
category = type;
|
category = type;
|
||||||
tagValues.put(POI_TYPE_TAG, "");
|
tagValues.put(POI_TYPE_TAG, "");
|
||||||
changedTags.add(POI_TYPE_TAG);
|
changedTags.add(POI_TYPE_TAG);
|
||||||
|
removeCurrentTypeTag();
|
||||||
|
currentPoiType=null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
||||||
private EditPoiData editPoiData;
|
private EditPoiData editPoiData;
|
||||||
private EditPoiViewPager viewPager;
|
private EditPoiViewPager viewPager;
|
||||||
private AutoCompleteTextView poiTypeEditText;
|
private AutoCompleteTextView poiTypeEditText;
|
||||||
private boolean poiCategoryChanged;
|
|
||||||
|
|
||||||
private OnSaveButtonClickListener onSaveButtonClickListener;
|
private OnSaveButtonClickListener onSaveButtonClickListener;
|
||||||
private OpenstreetmapUtil mOpenstreetmapUtil;
|
private OpenstreetmapUtil mOpenstreetmapUtil;
|
||||||
|
@ -299,11 +298,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
if (!getEditPoiData().isInEdit()) {
|
if (!getEditPoiData().isInEdit()) {
|
||||||
if (!poiCategoryChanged) {
|
|
||||||
getEditPoiData().updateTypeTag(s.toString(), true);
|
getEditPoiData().updateTypeTag(s.toString(), true);
|
||||||
} else {
|
|
||||||
poiCategoryChanged = false;
|
|
||||||
}
|
|
||||||
if (!getMyApplication().isApplicationInitializing()) {
|
if (!getMyApplication().isApplicationInitializing()) {
|
||||||
PoiCategory category = editPoiData.getPoiCategory();
|
PoiCategory category = editPoiData.getPoiCategory();
|
||||||
if (category != null) {
|
if (category != null) {
|
||||||
|
@ -648,7 +643,6 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPoiCategory(PoiCategory type) {
|
public void setPoiCategory(PoiCategory type) {
|
||||||
poiCategoryChanged = true;
|
|
||||||
editPoiData.updateType(type);
|
editPoiData.updateType(type);
|
||||||
poiTypeEditText.setText(editPoiData.getPoiTypeString());
|
poiTypeEditText.setText(editPoiData.getPoiTypeString());
|
||||||
setAdapterForPoiTypeEditText();
|
setAdapterForPoiTypeEditText();
|
||||||
|
|
Loading…
Reference in a new issue