Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Undo/redo bugs on DrawWay #3385

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Undo/redo bugs on DrawWay #3385

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: Richard
[Submitted to the original trac issue database at 2.26am, Friday, 10th December 2010]

A couple of ways to foul it up entertainingly:

  • Start drawing a way. Click 'Undo' while the elastic is available. Enjoy all the fun of drawing a way without any of the consequences!

  • Start drawing a way. Press Delete or Escape to end it (which maps to Undo). Click Redo. A dupe node appears (which it shouldn't). Now click the dupe node and press delete. Select a way somewhere and shift-click to add a new node. The result is a Flash exception in hitTest (WayUI line 545) which is the usual tell-tale sign of a mismatch between Ways and WayUIs.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 4.36am, Friday, 24th December 2010]

I had a bit of a look. It's not entirely obvious what the correct behaviour is when pressing "undo" in the middle of a draw sequence. A few possibilities:

  1. Undo should be like delete/minus, except creating "redo" actions rather than "undo" ones.
  2. Undo should be exactly like delete/minus (ok, that would be weird)
  3. Undo should instantly remove the whole drawn way.
  4. Nothing - disable. (Not as bizarre as it sounds, various other editing programs work this way.)

There's also two choices about how the whole undo/redo thing works for drawn nodes:

  1. Individual nodes can be undone/redone
  2. The whole sequence (between starting drawing and pressing enter/finishing) is one undo step.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 2.28pm, Saturday, 3rd March 2012]

Not sure if I fixed the first one in my fix for #3860, but in any case, I can't reproduce it now. (Yay). The second gives me a different error, slightly earlier in the sequence.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant