From d430ce9867dc5c010848d75d8e2859e67be9c0cb Mon Sep 17 00:00:00 2001 From: Chayan Deb Date: Mon, 17 Mar 2025 12:55:28 +0530 Subject: [PATCH] Added wire-coordinate ordering before storing the object in 'src/move.c' -> 'move_objects()' to remove any discrepancies (addresses issues mentioned in #336). --- src/move.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/move.c b/src/move.c index 038856b7..19c451e4 100644 --- a/src/move.c +++ b/src/move.c @@ -1147,6 +1147,7 @@ void move_objects(int what, int merge, double dx, double dy) { wire[n].x2 = xctx->rx2; wire[n].y2 = xctx->ry1; + ORDER(xctx->rx2,xctx->ry1,xctx->rx2,xctx->ry2); storeobject(-1, xctx->rx2,xctx->ry1,xctx->rx2,xctx->ry2,WIRE,0,0,NULL); hash_wire(XINSERT, xctx->wires-1, 1); drawline(WIRELAYER,ADD, xctx->rx2,xctx->ry1,xctx->rx2,xctx->ry2, 0, NULL); @@ -1155,12 +1156,14 @@ void move_objects(int what, int merge, double dx, double dy) { wire[n].x2 = xctx->rx1; wire[n].y2 = xctx->ry2; + ORDER(xctx->rx1,xctx->ry2,xctx->rx2,xctx->ry2); storeobject(-1, xctx->rx1,xctx->ry2,xctx->rx2,xctx->ry2,WIRE,0,0,NULL); hash_wire(XINSERT, xctx->wires-1, 1); drawline(WIRELAYER,ADD, xctx->rx1,xctx->ry2,xctx->rx2,xctx->ry2, 0, NULL); } else { + /* no need for ordering coordinates - already done before */ wire[n].x2 = xctx->rx2; wire[n].y2 = xctx->ry2; }