diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html
index cf43eea3..3d64a8ee 100644
--- a/doc/xschem_man/developer_info.html
+++ b/doc/xschem_man/developer_info.html
@@ -1438,6 +1438,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
cadgrid set cad grid (default: 20)
cadsnap set mouse snap (default: 10)
color_ps set color psoscript (1 or 0)
+ crosshair_layer set layer for mouse crosshair
constr_mv set constrained move (1=horiz, 2=vert, 0=none)
cursor1_x set graph cursor1 position
cursor2_x set graph cursor2 position
diff --git a/src/scheduler.c b/src/scheduler.c
index 08d6c033..ffb1ff47 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -5081,8 +5081,16 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else if(!strcmp(argv[2], "color_ps")) { /* set color psoscript (1 or 0) */
color_ps=atoi(argv[3]);
}
+ else if(!strcmp(argv[2], "crosshair_layer")) { /* set layer for mouse crosshair */
+ int c = atoi(argv[3]);
+ tclsetintvar("crosshair_layer", c);
+ xctx->crosshair_layer = c;
+ if(xctx->crosshair_layer < 0 ) xctx->crosshair_layer = 2;
+ if(xctx->crosshair_layer >= cadlayers ) xctx->crosshair_layer = 2;
+ }
else if(!strcmp(argv[2], "constr_mv")) { /* set constrained move (1=horiz, 2=vert, 0=none) */
xctx->constr_mv = atoi(argv[3]);
+ if(xctx->constr_mv < 0 || xctx->constr_mv > 2) xctx->constr_mv = 0;
}
else if(!strcmp(argv[2], "cursor1_x")) { /* set graph cursor1 position */
xctx->graph_cursor1_x = atof_spice(argv[3]);