attach_labels_to_inst(): do not cause an error (bbox(SET) call before bbox(START)) if invoked on selected instances who have all pins already wired up

This commit is contained in:
stefan schippers 2023-09-15 15:16:36 +02:00
parent a28f9506f8
commit 7d2f737c3b
2 changed files with 8 additions and 7 deletions

View File

@ -1179,11 +1179,10 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710
}
if(!strcmp(tclgetvar("use_lab_wire"),"0")) {
place_symbol(-1,symname_pin, pinx0, piny0, rot1, dir, prop, 2, first_call, 1/*to_push_undo*/);
first_call=0;
} else {
place_symbol(-1,symname_wire, pinx0, piny0, rot1, dir, prop, 2, first_call, 1/*to_push_undo*/);
first_call=0;
}
first_call=0;
}
dbg(1, "attach_labels_to_inst(): %d %.16g %.16g %s\n", i, pinx0, piny0,labname);
}
@ -1194,9 +1193,11 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710
my_free(_ALLOC_ID_, &type);
if(!found) return;
/* draw things */
bbox(SET , 0.0 , 0.0 , 0.0 , 0.0);
draw();
bbox(END , 0.0 , 0.0 , 0.0 , 0.0);
if(!first_call) {
bbox(SET , 0.0 , 0.0 , 0.0 , 0.0);
draw();
bbox(END , 0.0 , 0.0 , 0.0 , 0.0);
}
} else {
fprintf(errfp, "attach_labels_to_inst(): location of schematic labels not found\n");
tcleval("alert_ {attach_labels_to_inst(): location of schematic labels not found} {}");

View File

@ -2477,9 +2477,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
* if no 'attr' is given return full attribute string,
* else return value for attribute 'attr'.
* Example: xschem pinlist x3 name
* --> {PLUS} {OUT} {MINUS}
* --> { {0} {PLUS} } { {1} {OUT} } { {2} {{MINUS} }
* Example: xschem pinlist x3 dir
* --> {in} {out} {in}
* --> { {0} {in} } { {1} {out} } { {2} {in} }
* Example: xschem pinlist x3
* --> { {0} {name=PLUS dir=in } } { {1} {name=OUT dir=out } }
* { {2} {name=MINUS dir=in } }