fix a bug in `xschem annotate_op` function not showing data if `Live annotation...` option was not set beforehand.
This commit is contained in:
parent
910235749b
commit
89d847fb62
|
|
@ -254,6 +254,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
} else {
|
||||
my_snprintf(f, S(f), "%s/%s.raw", tclgetvar("netlist_dir"), get_cell(xctx->sch[xctx->currsch], 0));
|
||||
}
|
||||
tclsetboolvar("live_cursor2_backannotate", 1);
|
||||
tclsetvar("rawfile_loaded", "0");
|
||||
free_rawfile(1);
|
||||
tcleval("array unset ngspice::ngspice_data");
|
||||
|
|
|
|||
30
src/token.c
30
src/token.c
|
|
@ -3400,10 +3400,8 @@ const char *translate(int inst, const char* s)
|
|||
else if(strcmp(token,"@spice_get_voltage")==0 )
|
||||
{
|
||||
int start_level; /* hierarchy level where waves were loaded */
|
||||
if(xctx->graph_annotate_p>=0 && !tclgetboolvar("live_cursor2_backannotate")) {
|
||||
xctx->graph_annotate_p = -1;
|
||||
}
|
||||
if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int live = tclgetboolvar("live_cursor2_backannotate");
|
||||
if(live && (start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int multip;
|
||||
int no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER];
|
||||
if(no_of_pins == 1) {
|
||||
|
|
@ -3471,11 +3469,9 @@ const char *translate(int inst, const char* s)
|
|||
else if(strncmp(token,"@spice_get_voltage(", 19)==0 )
|
||||
{
|
||||
int start_level; /* hierarchy level where waves were loaded */
|
||||
int live = tclgetboolvar("live_cursor2_backannotate");
|
||||
dbg(1, "--> %s\n", token);
|
||||
if(xctx->graph_annotate_p>=0 && !tclgetboolvar("live_cursor2_backannotate")) {
|
||||
xctx->graph_annotate_p = -1;
|
||||
}
|
||||
if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
if(live && (start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
char *fqnet = NULL;
|
||||
const char *path = xctx->sch_path[xctx->currsch] + 1;
|
||||
char *net = NULL;
|
||||
|
|
@ -3529,10 +3525,8 @@ const char *translate(int inst, const char* s)
|
|||
else if(strncmp(token,"@spice_get_current(", 19)==0 )
|
||||
{
|
||||
int start_level; /* hierarchy level where waves were loaded */
|
||||
if(xctx->graph_annotate_p>=0 && !tclgetboolvar("live_cursor2_backannotate")) {
|
||||
xctx->graph_annotate_p = -1;
|
||||
}
|
||||
if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int live = tclgetboolvar("live_cursor2_backannotate");
|
||||
if(live && (start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
char *fqdev = NULL;
|
||||
const char *path = xctx->sch_path[xctx->currsch] + 1;
|
||||
char *dev = NULL;
|
||||
|
|
@ -3599,10 +3593,8 @@ const char *translate(int inst, const char* s)
|
|||
else if(strcmp(token,"@spice_get_diff_voltage")==0 )
|
||||
{
|
||||
int start_level; /* hierarchy level where waves were loaded */
|
||||
if(xctx->graph_annotate_p>=0 && !tclgetboolvar("live_cursor2_backannotate")) {
|
||||
xctx->graph_annotate_p = -1;
|
||||
}
|
||||
if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int live = tclgetboolvar("live_cursor2_backannotate");
|
||||
if(live && (start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int multip;
|
||||
int no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER];
|
||||
if(no_of_pins == 2) {
|
||||
|
|
@ -3668,10 +3660,8 @@ const char *translate(int inst, const char* s)
|
|||
else if(strcmp(token,"@spice_get_current")==0 )
|
||||
{
|
||||
int start_level; /* hierarchy level where waves were loaded */
|
||||
if(xctx->graph_annotate_p>=0 && !tclgetboolvar("live_cursor2_backannotate")) {
|
||||
xctx->graph_annotate_p = -1;
|
||||
}
|
||||
if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
int live = tclgetboolvar("live_cursor2_backannotate");
|
||||
if(live && (start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) {
|
||||
char *fqdev = NULL;
|
||||
const char *path = xctx->sch_path[xctx->currsch] + 1;
|
||||
char *dev = NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue