Opened 18 months ago
Last modified 17 months ago
#7148 new defect
Nodes that are not selectable are posible select via selection history
| Reported by: | alv | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Component: | Core |
| Version: | latest | Keywords: | deleted selection patch |
| Cc: |
Description (last modified by alv)
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 Changed 18 months ago by alv
- Description modified (diff)
- Keywords distribute removed
- Summary changed from Distribute nodes and selected but already deleted nodes to Tools make use of selected but already deleted nodes
Changed 18 months ago by Kalle Lampila
comment:2 Changed 18 months ago by Kalle Lampila
- Keywords patch added
- Summary changed from Tools make use of selected but already deleted nodes to [PATCH] Tools make use of selected but already deleted nodes
comment:3 Changed 18 months ago by Kalle Lampila
comment:4 follow-ups: ↓ 5 ↓ 6 ↓ 7 Changed 17 months ago by stoecker
- Summary changed from [PATCH] Tools make use of selected but already deleted nodes to 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 in reply to: ↑ 4 Changed 17 months ago by bastiK
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 in reply to: ↑ 4 Changed 17 months ago by anonymous
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 in reply to: ↑ 4 Changed 17 months ago by Kalle Lampila
- Summary changed from Tools make use of selected but already deleted nodes to 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 Changed 17 months ago by stoecker
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.