Opened 10 years ago
Closed 10 years ago
#10092 closed defect (fixed)
Preset filtering does not work for closed ways
Reported by: | akks | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 14.06 |
Component: | Core | Version: | latest |
Keywords: | Cc: | simon04 |
Description
Reported by golyanitskiy, russian forum.
The list of presets in F3 Preset Selector dialog is almost empty if a closed way is selected (
This is a regression of r7153.
The problem is not in the changes itself but in getTypesInSelection()
:
http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java#L402
Closed way is counted twice - as WAY and as CLOSEDWAY. Preset filter thinks that both types should be present in Preset.types
:
http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java#L444
Attachments (0)
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Please check the solution before closing the ticket.
@simon04: the changes in filterPresets()
are just refactoring and speed-up, could you please check that relation-based filtering work as expected? (I did not get the idea and how to test it)
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'm sorry for introducing the bug. Your changes are fine. I performed some refactoring and added tests to this functionality.
I did not get the idea and how to test it
Previously, with railway=tram ways in the current selection, one couldn't create a public transport relation when "only applicable to selection" was enabled. The basic idea is to evaluate the presets from the selection wrt. memberExpression from defaultpresets.xml
and show matching relation presets …
In 7207/josm: