add draw_crosshair() (if enabled) at end of any draw() operation

This commit is contained in:
stefan schippers 2023-09-22 13:13:35 +02:00
parent eb91c8bbea
commit 93291ed84b
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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) */
}