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

Fix for #3860 (undo bug on create way) #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stevage
Copy link

@stevage stevage commented Mar 3, 2012

This fixes the funniness around undo/redo for creating new ways:

"Click two or more points (=n) on map - a way connecting clicked points is being created. After (n-1) Undo's the way is gone, but the initial point still remains visible (a green dot) and the Undo button is already grayed out - one step got forgot.

It is possible to delete the point manually (red (x) button), but it should be also deleted by the n-th Undo."

My head hurts now. In an ideal world I would have squashed the three commits into one. I tried that, but Git growled at me and threatened to take my work and never give it back, so we compromised.

Defines BeginWayAction as including node creation and way creation.
When the second last node gets undone, the BWA gets split apart
and the node creation is preserved, but repackaged as a
CreatePOIAction. Ugh.
Turned out to be pretty hard to come up with a clean solution
because the way is created before the user has chosen where
the second node goes etc. Anyway, it works.
@systemed
Copy link
Owner

I have a branch to test this and looking at it properly is my next todo. :)

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

Successfully merging this pull request may close these issues.

2 participants