Modify

Opened 7 years ago

Last modified 7 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 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)

0001-fix-7148-Make-sure-that-only-selectable-items-are-se.patch (3.1 KB) - added by KalleLampila 7 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by alv

Description: modified (diff)
Keywords: distribute removed
Summary: Distribute nodes and selected but already deleted nodesTools make use of selected but already deleted nodes

comment:2 Changed 7 years ago by KalleLampila

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 Changed 7 years ago by KalleLampila

Deleted nodes should not be selected. Patch make sure that only selectable item are selected. It also fix name calculation to selection history menu.

comment:4 Changed 7 years ago by stoecker

Summary: [PATCH] Tools make use of selected but already deleted nodesTools 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 7 years 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 7 years 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 7 years ago by KalleLampila

Summary: Tools make use of selected but already deleted nodesNodes 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 7 years 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).

comment:9 Changed 7 years ago by alv

If the search should find deleted objects with their id, it doesn't. Tried with r4279 and r4620.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to alv
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.