Opened 9 years ago

Closed 9 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


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():

Closed way is counted twice - as WAY and as CLOSEDWAY. Preset filter thinks that both types should be present in Preset.types:

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by akks

In 7207/josm:

see #10092: preset filtering did not work correctly for closed ways

comment:2 Changed 9 years ago by akks

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:3 Changed 9 years ago by simon04

In 7210/josm:

see #10092 - Refactor and test preset filtering

comment:4 Changed 9 years ago by simon04

Resolution: fixed
Status: newclosed

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 …

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.