Opened 13 years ago
Last modified 13 years ago
#7148 new defect
Nodes that are not selectable are posible select via selection history
Reported by: | alv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | deleted selection patch | Cc: |
Description (last modified by )
The title may seem cryptic, but steps to reproduce:
- draw a unclosed way with four nodes
- select each node
- distribute nodes
- select one of the middle nodes
- delete that node
- using the select history on the right hand selection panel, select the first line that reads "4 nodes"
- you see three remaining (as in not deleted) nodes selected
- select distribute nodes
expected result:
- equal distances between the three nodes
result:
- no change, equal distance between all four nodes, including the deleted.
In fact, all (or many) tool actions work with the deleted nodes as if they still existed, when reselected in this manner. At least align in line, align in circle, orthogonalize (ways + two deleted nodes).
Attachments (1)
Change History (10)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|---|
Keywords: | distribute removed |
Summary: | Distribute nodes and selected but already deleted nodes → Tools make use of selected but already deleted nodes |
by , 13 years ago
Attachment: | 0001-fix-7148-Make-sure-that-only-selectable-items-are-se.patch added |
---|
comment:2 by , 13 years ago
Keywords: | patch added |
---|---|
Summary: | Tools make use of selected but already deleted nodes → [PATCH] Tools make use of selected but already deleted nodes |
comment:3 by , 13 years ago
follow-ups: 5 6 7 comment:4 by , 13 years ago
Summary: | [PATCH] Tools make use of selected but already deleted nodes → Tools make use of selected but already deleted nodes |
---|
This patch is wrong. JOSM handles deleted, incomplete and other non-real data. This is perfectly valid. The tools need be fixed not to use this data when doing their job.
comment:5 by , 13 years ago
Replying to stoecker:
This patch is wrong. JOSM handles deleted, incomplete and other non-real data. This is perfectly valid. The tools need be fixed not to use this data when doing their job.
I agree, but most of the editing tools cannot handle deleted objects. Maybe we should add a parameter
getSelected(boolean includeDeleted)
and
getSelected() { return getSelected(false); }
comment:6 by , 13 years ago
Replying to stoecker:
The tools need be fixed not to use this data when doing their job.
Why not provide a method in the selection code for getting all data that is currently visible? That way the tools wouldn't all have to make the check by themselves.
comment:7 by , 13 years ago
Summary: | Tools make use of selected but already deleted nodes → Nodes that are not selectable are posible select via selection history |
---|
Replying to stoecker:
This patch is wrong. JOSM handles deleted, incomplete and other non-real data. This is perfectly valid. The tools need be fixed not to use this data when doing their job.
I think that you are misunderstood patch. It not prevent handles deleted, incomplete and other non-real data. It only prevent select primitives that are not selectable.
There is not any error in distribute nodes as you can read original bug description. (User only don't see that deleted node)
What is purpose of PrimitiveId:isSelectable() function?
comment:8 by , 13 years ago
Deleted elements are and should be selectable, like incomplete ones. If you can't select them, you can't work with them. Don't mix select by click with select by other means (like search).
Deleted nodes should not be selected. Patch make sure that only selectable item are selected. It also fix name calculation to selection history menu.