[Refactor + Minor Changes]: Refactored to fix a small code-readablity issue from last upstream merge. Added the snap_cursor option to be enabled from 'src/xschemrc' config file.

This commit is contained in:
Chayan Deb 2025-01-26 12:33:21 +05:30
parent 999503a26a
commit 18fb977c68
2 changed files with 4 additions and 1 deletions

View File

@ -2569,8 +2569,8 @@ int rstate; /* (reduced state, without ShiftMask) */
if(draw_xhair) {
draw_crosshair(1); /* when moving mouse: first action is delete crosshair, will be drawn later */
}
/* pan schematic */
if(snap_cursor && wire_draw_active) draw_snap_cursor(1);
/* pan schematic */
if(xctx->ui_state & STARTPAN) pan(RUBBER, mx, my);
if(xctx->semaphore >= 2) {

View File

@ -285,6 +285,9 @@
#### set crosshair size; Default: 0 (full screen spanning crosshair)
set crosshair_size 2
#### enable drawing a diamond-shaped cursor at the closest circuit endpoint. Default: disabled (0)
# set snap_cursor 1
#### set snap_cursor_size; Default: 3 (Diamond-shaped cursor that snaps to nearest circuit endpoint)
# set snap_cursor_size 3