Repeating a multi-level feature can cause duplicates in level attribute
Summary
- Operating system : macOS 10.13.6
- Web browser : Firefox 72.0.2
(Summarize the bug encountered concisely)
Steps to reproduce
- Create stairs with a half-level landing
- Stairs from 1 to 1.5:
level=1;1.5
highway=steps
- Stairs from 1 to 1.5:
- Try to repeat first stairs on the floor above
- Add attribute
repeat_on=2;2.5
- Add attribute
What is the current bug behavior?
The level attribute is rewritten to 1;1.5;2;2;2;2;2.5
in two steps, once after the 2;
then again after the 2.5
What is the expected correct behavior?
The level attribute should be level=1;1.5;2;2.5
, without the duplicated 2
s.
(
Relevant logs and/or screenshots
Possible fixes
If there are both levels and repeat_on, VectorDataManager.js#L2447 concatenates both float arrays to make the new value of the levels attribute. It should treat them as an ordered set to remove duplicates.