From 0824c1b9b84b9abde810b4ea1256a05af3d2d6a8 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 22 Jan 2025 17:00:03 +0100 Subject: [PATCH 1/2] fix garbage on screen due to crosshair cursor if copying by drag (Shift-click-drag) in intuitive interface (collision with snapped crosshair position) --- src/callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/callback.c b/src/callback.c index e776c28b..17292a26 100644 --- a/src/callback.c +++ b/src/callback.c @@ -2550,7 +2550,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } } if(draw_xhair) { - if(/* (xctx->ui_state & STARTWIRE) && */ (state & ShiftMask) ) { + if( ( (xctx->ui_state & STARTWIRE) || xctx->ui_state == 0 ) && (state & ShiftMask) ) { double x, y, sx, sy; sx = xctx->mousex_snap; sy = xctx->mousey_snap; @@ -4087,6 +4087,7 @@ int rstate; /* (reduced state, without ShiftMask) */ /* terminate wire placement in snap mode */ else if(button==Button1 && (state & ShiftMask) && (xctx->ui_state & STARTWIRE) ) { snapped_wire(c_snap); + here(1111); } /* Alt - Button1 click to unselect */ else if(button==Button1 && (SET_MODMASK) ) { From 096eb126c1af417e12644a50d5c00e560ab10f1a Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 22 Jan 2025 17:29:17 +0100 Subject: [PATCH 2/2] comment in the code --- src/callback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/callback.c b/src/callback.c index 17292a26..6be2341f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -2549,6 +2549,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } } } + /* snap crosshair to closest pin or net endpoint */ if(draw_xhair) { if( ( (xctx->ui_state & STARTWIRE) || xctx->ui_state == 0 ) && (state & ShiftMask) ) { double x, y, sx, sy;