do a change linewidth before redrawing after invoking set_snap(), before draw()

This commit is contained in:
stefan schippers 2024-03-02 03:46:08 +01:00
parent 41d126b3c6
commit 731dd91018
2 changed files with 3 additions and 0 deletions

View File

@ -2208,6 +2208,7 @@ int rstate; /* (reduced state, without ShiftMask) */
if(key=='g' && rstate==0) /* half snap factor */
{
set_snap(c_snap / 2.0);
change_linewidth(-1.);
draw();
break;
}
@ -2222,6 +2223,7 @@ int rstate; /* (reduced state, without ShiftMask) */
if(key=='G' && rstate == 0) /* double snap factor */
{
set_snap(c_snap * 2.0);
change_linewidth(-1.);
draw();
break;
}

View File

@ -4546,6 +4546,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else if(!strcmp(argv[2], "cadsnap")) { /* set mouse snap (default: 10) */
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
set_snap( atof(argv[3]) );
change_linewidth(-1.);
draw();
}
else if(!strcmp(argv[2], "color_ps")) { /* set color psoscript (1 or 0) */