From 93291ed84ba527e92ffd9925065615d6d80d62b7 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 22 Sep 2023 13:13:35 +0200 Subject: [PATCH] add draw_crosshair() (if enabled) at end of any draw() operation --- src/callback.c | 4 ++-- src/draw.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callback.c b/src/callback.c index ccd56da7..0091c879 100644 --- a/src/callback.c +++ b/src/callback.c @@ -1011,9 +1011,9 @@ void draw_crosshair(int del) if(!del) { drawline(TEXTLAYER, NOW,X_TO_XSCHEM( xctx->areax1), xctx->mousey_snap, - X_TO_XSCHEM(xctx->areax2), xctx->mousey_snap, 2, NULL); + X_TO_XSCHEM(xctx->areax2), xctx->mousey_snap, 3, NULL); drawline(TEXTLAYER, NOW, xctx->mousex_snap, Y_TO_XSCHEM(xctx->areay1), - xctx->mousex_snap, Y_TO_XSCHEM(xctx->areay2), 2, NULL); + xctx->mousex_snap, Y_TO_XSCHEM(xctx->areay2), 3, NULL); } xctx->prev_crossx = xctx->mousex_snap; xctx->prev_crossy = xctx->mousey_snap; diff --git a/src/draw.c b/src/draw.c index 5aa187fe..132ad711 100644 --- a/src/draw.c +++ b/src/draw.c @@ -3833,6 +3833,7 @@ void draw(void) } else { draw_selection(xctx->gc[SELLAYER], 0); /* 20181009 moved outside of cadlayers loop */ } + if(tclgetboolvar("draw_crosshair")) draw_crosshair(0); } /* if(has_x) */ }