From a2955af3efd48c48d06a2dcd9bca9cc3b5d8c403 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 26 Apr 2009 19:36:12 -0400 Subject: Include the vertex if it is where the two polygons touch diagonally --- sigmodr/widgets/mapeditor/WorldMapPlacement.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp index 563018cd..bb157b02 100644 --- a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp +++ b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp @@ -110,6 +110,8 @@ static CollisionInfo findCollisions(const QPolygon& polygon1, const QPolygon& po Resolutions flags = 0; if (turnDirection(prevPoint1, point1, nextPoint1) != Invalid) flags |= Delete; + if (((point2.x() == prevPoint2.x()) && (prevPoint2.x() == nextPoint1.x())) || ((point2.y() == prevPoint2.y()) && (prevPoint2.y() == nextPoint1.y()))) + flags |= Include; data[point1] = NextTarget(flags, point1); break; } -- cgit