mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
Fix possible error when drawing outline primitive macros that contains duplicate points (#580)
This commit is contained in:
@@ -87,7 +87,7 @@ public class OutlinePrimitive : Primitive
|
||||
for (int i = 0; i < Coordinates.Length-1; i++)
|
||||
{
|
||||
var pt = Document.PositionMmToPx(at.X + Coordinates[i].X, at.Y + Coordinates[i].Y);
|
||||
if(i > 0 && points[i-1] == pt) continue; // Prevent duplicates
|
||||
if(points.Count > 0 && points[^1] == pt) continue; // Prevent series of duplicates
|
||||
points.Add(pt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user