This commit is contained in:
Dima-1 2020-07-21 16:19:15 +03:00
parent 35d8edb23a
commit 138b4862af

View file

@ -31,6 +31,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.osmedit.AddPOIAction;
import java.util.List;
@ -232,6 +233,10 @@ public class CreateEditActionDialog extends DialogFragment
@Override
public void onClick(View view) {
if (action instanceof AddPOIAction) {
saveFirstTagWithEmptyValue();
}
if (action.fillParams(((ViewGroup) root.findViewById(R.id.container)).getChildAt(0), (MapActivity) getActivity())) {
if (quickActionRegistry.isNameUnique(action, getContext())) {
@ -272,6 +277,10 @@ public class CreateEditActionDialog extends DialogFragment
Toast.makeText(getContext(), R.string.quick_action_empty_param_error, Toast.LENGTH_SHORT).show();
}
}
private void saveFirstTagWithEmptyValue() {
((ViewGroup) root.findViewById(R.id.container)).getChildAt(0).requestFocus();
}
});
}