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

Conversation

@stevage
Copy link

@stevage stevage commented May 13, 2012

I also merged the very similar RemoveNodeFromWayAction and
RemoveNodeByIndexAction into a rewritten RemoveNodeFromWayAction.
There's lots of fiddliness in this stuff to do with the undo model,
which necessitates writing actions "in the future", and also
various signals that can get bounced back and forth: removing a node
might necessitate removing the way, which in turn calls the node
removal code.

There's also the trickiness that sometimes single-node ways should exist,
especially during user interaction like drawing a way, or replacing a
node with another one during a merge.

I preserved the behaviour that RemoveNodeFromWayAction also cleans
out repeated nodes first. This shouldn't really be there, but at least
it's a separate code block, and can be removed at some future point.

There's also a bit of bonus source code commenting.

I also merged the very similar RemoveNodeFromWayAction and
RemoveNodeByIndexAction into a rewritten RemoveNodeFromWayAction.
There's lots of fiddliness in this stuff to do with the undo model,
which necessitates writing actions "in the future", and also
various signals that can get bounced back and forth: removing a node
might necessitate removing the way, which in turn calls the node
removal code.

There's also the trickiness that sometimes single-node ways should exist,
especially during user interaction like drawing a way, or replacing a
node with another one during a merge.

I preserved the behaviour that RemoveNodeFromWayAction also cleans
out repeated nodes first. This shouldn't really be there, but at least
it's a separate code block, and can be removed at some future point.

There's also a bit of bonus source code commenting.
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.

1 participant