Fix #6589 (Changing POI category on an existing object has no impact.(try to change the category by tapping on label icon))
This commit is contained in:
parent
ad3011a802
commit
744b36b87c
1 changed files with 7 additions and 1 deletions
|
@ -112,6 +112,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
|||
private EditPoiData editPoiData;
|
||||
private EditPoiViewPager viewPager;
|
||||
private AutoCompleteTextView poiTypeEditText;
|
||||
private boolean poiCategoryChanged;
|
||||
|
||||
private OnSaveButtonClickListener onSaveButtonClickListener;
|
||||
private OpenstreetmapUtil mOpenstreetmapUtil;
|
||||
|
@ -298,7 +299,11 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
|||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!getEditPoiData().isInEdit()) {
|
||||
getEditPoiData().updateTypeTag(s.toString(), true);
|
||||
if (!poiCategoryChanged) {
|
||||
getEditPoiData().updateTypeTag(s.toString(), true);
|
||||
} else {
|
||||
poiCategoryChanged = false;
|
||||
}
|
||||
if (!getMyApplication().isApplicationInitializing()) {
|
||||
PoiCategory category = editPoiData.getPoiCategory();
|
||||
if (category != null) {
|
||||
|
@ -643,6 +648,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
|||
}
|
||||
|
||||
public void setPoiCategory(PoiCategory type) {
|
||||
poiCategoryChanged = true;
|
||||
editPoiData.updateType(type);
|
||||
poiTypeEditText.setText(editPoiData.getPoiTypeString());
|
||||
setAdapterForPoiTypeEditText();
|
||||
|
|
Loading…
Reference in a new issue