From 260beffe717163602fb6023399d18d8f9440eda8 Mon Sep 17 00:00:00 2001 From: Chayan Deb Date: Sat, 25 Jan 2025 12:47:23 +0530 Subject: [PATCH] [Selection Using Crosshair]: Added new functionality of using the crosshair to select objects in the schematic, instead of the default mouse-pointer based selection. This functionality will only take effect if the crosshair feature is enabled by the user. --- src/callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/callback.c b/src/callback.c index fb605967..2601ab0b 100644 --- a/src/callback.c +++ b/src/callback.c @@ -4301,7 +4301,8 @@ int rstate; /* (reduced state, without ShiftMask) */ } if(!xctx->intuitive_interface && no_shift_no_ctrl ) unselect_all(1); - sel = find_closest_obj(xctx->mousex, xctx->mousey, 0); + if(draw_xhair) sel = find_closest_obj(xctx->mousex_snap, xctx->mousey_snap, 0); + else sel = find_closest_obj(xctx->mousex, xctx->mousey, 0); switch(sel.type) { case WIRE: if(xctx->wire[sel.n].sel) already_selected = 1; break;