MarcusWolschon / osmeditor4android

Vespucci is a OpenStreetMap editor for Android
http://vespucci.io
Other
381 stars 83 forks source link

Problem with the new value selector for integers and the layer key (and level etc.) #2643

Closed jajajaneeneenee closed 3 months ago

jajajaneeneenee commented 3 months ago

Vespucci Version

20.1.0 Beta5

Download source

Google Play Store

Behaviour/Symptoms

This is a problem where I'm not sure if it belongs in the Vespucci repository or in the Beautified Presets repository. But since it only exists since the new value selector for integers, I'll describe it here...

The problem: with the new value selector for integers, you cannot choose a negative value, e.g. layer=-1 for tunnels (the layer key has value_type="integer" in the "Beautified Presets", which is correct ...). And if you enter -1 in the details tab and use the value selector again, then negative values are displayed (but first 1 is displayed instead of -1, as long as you don't touch the selector). And if you choose -1 there again and press SAVE, the value is set to 255.

The only workaround I found is to remove value_type="integer" for the layer key in the presets (e.g. in chunk "layer" and in the items "Tunnel" and "Culvert") – but that is certainly not the best way.

Expected Behaviour

The new value selector should also support negative values for keys which need it. Other candidates that come to mind (not yet tested): level, min_level, max_level, building:min_level.

jajajaneeneenee commented 3 months ago

Is something unclear?

Another suggestion: If it is a combo item (not a text item) with value_type="integer", perhaps the selector for integers should only display the values ​​specified in the combo (of course including negative values).

simonpoole commented 3 months ago

It needs investigation as to why it isn't working as intended as it is supposed to take any existing (aka combo) values in to account to determine if to show negative values or not.