some cleanups in scheduler.c "xschem annotate_op" command.

This commit is contained in:
Stefan Frederik 2022-09-20 23:07:50 +02:00
parent b542186ebd
commit 933faceabf
2 changed files with 14 additions and 11 deletions

View File

@ -246,7 +246,7 @@ static void backannotate_at_cursor_b_pos(xRect *r, Graph_ctx *gr)
} }
} }
dbg(1, "xx=%g, p=%d\n", xx, p); dbg(1, "xx=%g, p=%d\n", xx, p);
tcleval("array unset ::ngspice::ngspice_data"); tcleval("array unset ngspice::ngspice_data");
xctx->graph_backannotate_p = p; xctx->graph_backannotate_p = p;
for(i = 0; i < xctx->graph_nvars; i++) { for(i = 0; i < xctx->graph_nvars; i++) {
char s[100]; char s[100];

View File

@ -376,8 +376,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
} }
tclsetvar("rawfile_loaded", "0"); tclsetvar("rawfile_loaded", "0");
free_rawfile(1); free_rawfile(1);
tcleval("array unset ngspice::ngspice_data");
raw_read(f, "op"); raw_read(f, "op");
if(xctx->graph_values) xctx->graph_backannotate_p = 0; if(xctx->graph_values) {
xctx->graph_backannotate_p = 0;
for(i = 0; i < xctx->graph_nvars; i++) { for(i = 0; i < xctx->graph_nvars; i++) {
char s[100]; char s[100];
int p = 0; int p = 0;
@ -389,6 +391,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
tclvareval("set ngspice::ngspice_data(n\\ points) 1", NULL); tclvareval("set ngspice::ngspice_data(n\\ points) 1", NULL);
draw(); draw();
} }
}
else if(!strcmp(argv[1],"arc")) else if(!strcmp(argv[1],"arc"))
{ {