fix xschem fullxzoom command (missing setup_graph command)

This commit is contained in:
stefan schippers 2023-02-26 23:33:07 +01:00
parent 3b41a486f6
commit 32288e056e
2 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,10 @@
# procedure to create a graph in an empty xschem window and display waveforms
proc create_graph {rawfile node {analysis tran} {color {4 5 6 7 8 9 10 11 12 13 14}}} {
puts " -->$node"
# clear window if not already empty
xschem clear force
# clear loaded raw file if any
@ -45,5 +49,7 @@ proc create_graph {rawfile node {analysis tran} {color {4 5 6 7 8 9 10 11 12 13
xschem setprop rect 2 0 fullxzoom
# full zoom graph data on y axis
xschem setprop rect 2 0 fullyzoom
# clear modified flag so we can quit without xschem asking to save changed file.
xschem set_modify 0
}

View File

@ -2783,6 +2783,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
xRect *r = &xctx->rect[c][n];
Graph_ctx *gr = &xctx->graph_struct;
int dataset;
setup_graph_data(n, 0, gr);
if(gr->dataset >= 0 && gr->dataset < xctx->graph_datasets) dataset = gr->dataset;
else dataset = -1;
graph_fullxzoom(r, gr, dataset);
@ -2792,7 +2793,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
Graph_ctx *gr = &xctx->graph_struct;
int dataset;
setup_graph_data(n, 0, gr);
if(gr->dataset >= 0 && gr->dataset < xctx->graph_datasets) dataset =gr->dataset;
if(gr->dataset >= 0 && gr->dataset < xctx->graph_datasets) dataset = gr->dataset;
else dataset = -1;
graph_fullyzoom(r, gr, dataset);
}