kopia lustrzana https://github.com/JOSM/MapWithAI
Only keep editable fields, but assume that a field is editable if the property does not exist
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
46ff076402
commit
e1acbc7ea3
|
@ -322,6 +322,7 @@ public class MapWithAILayerInfo {
|
||||||
JsonObject info = reader.readObject();
|
JsonObject info = reader.readObject();
|
||||||
|
|
||||||
return info.getJsonArray("fields").getValuesAs(JsonObject.class).stream()
|
return info.getJsonArray("fields").getValuesAs(JsonObject.class).stream()
|
||||||
|
.filter(o -> o.getBoolean("editable", true))
|
||||||
.collect(Collectors.toMap(o -> o.getString("name"), o -> o.getString("alias", null)));
|
.collect(Collectors.toMap(o -> o.getString("name"), o -> o.getString("alias", null)));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logging.error(e);
|
Logging.error(e);
|
||||||
|
|
Ładowanie…
Reference in New Issue