Modify

Opened 8 months ago

Last modified 6 weeks ago

#18133 new enhancement

[Patch draft] Undo edit to selected object(s)

Reported by: hjart Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: undo Cc: skyper

Description

Sometimes during my editing sessions I realize that I made a mistake earlier in the session. To undo that edit though, means that I would either have to undo the edits I made since then - or to the best of my ability try to move the object back to the original position, which is not always that easy.

Is there a chance we could have an option to undo edits to selected object(s)?

Attachments (1)

18133.patch (3.6 KB) - added by simon04 4 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 months ago by Klumbumbus

If I remember correctly purge the object and redownload it from the server works.

comment:2 in reply to:  1 Changed 8 months ago by skyper

Replying to Klumbumbus:

If I remember correctly purge the object and redownload it from the server works.

Nice but limited workaround. Did that several times but gets nasty with relations, new objects and partial undo, like only change of position and not tags.

See #4608.

Changed 4 months ago by simon04

Attachment: 18133.patch added

comment:3 Changed 4 months ago by simon04

Milestone: 20.02
Owner: changed from team to simon04
Status: newassigned
Summary: Undo edit to selected object(s)[Patch] Undo edit to selected object(s)

comment:4 Changed 4 months ago by GerdP

Doesn't work for me.

What steps will reproduce the problem?

  1. Draw a new way
  2. Tag it with highway=residential
  3. Draw another way
  4. Add name=test to the first way
  5. Undo "Set highway=residential"

What is the expected result?

First way has tag name=test , second way is unchanged

What happens instead?

First way has no tags, 2nd way disappears
Even clicking Redo doesn't get me to this result.

My understanding is that you can only undo a command which contains only objects which were not changed later on.

comment:5 Changed 4 months ago by GerdP

Oh, just noticed that you added a "Undo this action". I think it should be "Undo this command".
So, forget above results as I tested the standard "Undo" button.

Anyway, the results are still not correct. Repeat steps 1-4 and use "Undo this action" on "Set highway=residential" gives
First way has no tags, 2nd way is unchanged.
My conclusion remains the same.

comment:6 Changed 4 months ago by GerdP

Some code issues:

  • "Strings literals should be placed on the left side when checking for equality", so use "route".equals(type) instead of type.equals("route")
  • the unit tests have no javadoc, see e.g. OsmValidatorTest.testCleanupIgnoredErrorsTicket17837(). In HighwaysTest.testTicket14891() you can find an example that uses an *.osm file as input. This makes it easier to understand what the test is about as you can also load the test data into JOSM.
  • please use ant checkstyle pmd and fix the reported problems before providing a patch
Version 0, edited 4 months ago by GerdP (next)

comment:7 Changed 3 months ago by simon04

Milestone: 20.0220.03

comment:8 Changed 2 months ago by simon04

Milestone: 20.0320.04

comment:9 Changed 6 weeks ago by simon04

Milestone: 20.04
Owner: changed from simon04 to team
Status: assignednew
Summary: [Patch] Undo edit to selected object(s)[Patch draft] Undo edit to selected object(s)

comment:10 Changed 6 weeks ago by simon04

Cc: skyper added

skyper in ticket:4608

possibility to undo not just the last edit but any edit and raise a conflict if needed.

skyper in ticket:4608#comment:4

Undoing any edit separately would be a major enhancement. Just did get the info about deleting a node (by mistake) in the upload summary. The deletion had taken place more than 50 edits in advance. Only had two possibility to solve:

  • download the node again in an extra layer, modify it and merge the layers (did not exactly know the position)
  • save the data and edit the file with an text editor (that is what I did).

skyper in ticket:4608#comment:5

If 3. gets implemented some direct selection of objects in command line dialog from selection list's context menu would be nice or even an extra edit action "forget my changes".

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 hjart
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.