potlatch2 icon indicating copy to clipboard operation
potlatch2 copied to clipboard

Fix bugs related to single-node ways being generated in a few places (#4378)

Open stevage opened this issue 13 years ago • 0 comments

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.

stevage avatar May 13 '12 06:05 stevage