"@#n:net_name" attribute (n = pin name or number) in symbols translates to net name attached to pin. "lab_show.sym" component that shows (does not assign) net name. "highlight=true" attribute can be given on instances in addition to symbols. Set filename in recent history also when given on command line.
This commit is contained in:
parent
91e74fadcb
commit
392e7f9b57
|
|
@ -954,10 +954,13 @@ int place_symbol(int pos, const char *symbol_name, double x, double y, int rot,
|
|||
|
||||
if(first_call && (draw_sym & 3) ) bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0);
|
||||
|
||||
lastinst++;
|
||||
lastinst++; /* must be updated before calling symbol_bbox() */
|
||||
prepared_hash_instances=0; /* 20171224 */
|
||||
/* force these vars to 0 to trigger a prepare_netlist_structs(0) needed by symbol_bbox->translate
|
||||
* to translate @#n:net_name texts */
|
||||
prepared_netlist_structs=0;
|
||||
prepared_hilight_structs=0;
|
||||
|
||||
symbol_bbox(n, &inst_ptr[n].x1, &inst_ptr[n].y1,
|
||||
&inst_ptr[n].x2, &inst_ptr[n].y2);
|
||||
if(draw_sym & 3) bbox(ADD, inst_ptr[n].x1, inst_ptr[n].y1, inst_ptr[n].x2, inst_ptr[n].y2);
|
||||
|
|
|
|||
11
src/move.c
11
src/move.c
|
|
@ -821,15 +821,18 @@ void copy_objects(int what)
|
|||
inst_ptr[lastinst].rot = (inst_ptr[lastinst].rot +
|
||||
( (flip && (inst_ptr[lastinst].rot & 1) ) ? rot+2 : rot) ) & 0x3;
|
||||
inst_ptr[lastinst].flip = (flip? !inst_ptr[n].flip:inst_ptr[n].flip);
|
||||
/* the newpropcnt argument is zero for the 1st call and used in */
|
||||
/* new_prop_string() for cleaning some internal caches. */
|
||||
if(!newpropcnt) hash_all_names(lastinst);
|
||||
new_prop_string(lastinst, inst_ptr[n].prop_ptr,newpropcnt++, disable_unique_names);
|
||||
/* the final newpropcnt argument is zero for the 1st call and used in */
|
||||
/* new_prop_string() for cleaning some internal caches. */
|
||||
my_strdup2(235, &inst_ptr[lastinst].instname, get_tok_value(inst_ptr[lastinst].prop_ptr, "name", 0)); /* 20150409 */
|
||||
n=selectedgroup[i].n=lastinst;
|
||||
/* force these vars to 0 to trigger a prepare_netlist_structs(0) needed by symbol_bbox->translate
|
||||
* to translate @#n:net_name texts */
|
||||
prepared_netlist_structs=0;
|
||||
prepared_hilight_structs=0;
|
||||
lastinst++;
|
||||
|
||||
lastinst++; /* must be updated before calling symbol_bbox which triggers prepare_netlist_structs(0) */
|
||||
symbol_bbox(n, &inst_ptr[n].x1, &inst_ptr[n].y1,
|
||||
&inst_ptr[n].x2, &inst_ptr[n].y2);
|
||||
bbox(ADD, inst_ptr[n].x1, inst_ptr[n].y1, inst_ptr[n].x2, inst_ptr[n].y2 );
|
||||
|
|
@ -1277,6 +1280,8 @@ void move_objects(int what, int merge, double dx, double dy)
|
|||
( (flip && (inst_ptr[n].rot & 1) ) ? rot+2 : rot) ) & 0x3;
|
||||
inst_ptr[n].flip = flip ^ inst_ptr[n].flip;
|
||||
|
||||
/* force these vars to 0 to trigger a prepare_netlist_structs(0) needed by symbol_bbox->translate
|
||||
* to translate @#n:net_name texts */
|
||||
prepared_netlist_structs=0;
|
||||
prepared_hilight_structs=0;
|
||||
symbol_bbox(n, &inst_ptr[n].x1, &inst_ptr[n].y1,
|
||||
|
|
|
|||
|
|
@ -1979,8 +1979,8 @@ int load_sym_def(const char *name, FILE *embed_fd)
|
|||
break;
|
||||
case ']':
|
||||
if(level) {
|
||||
my_free(0, &lcc[level].prop_ptr);
|
||||
my_free(0, &lcc[level].symname);
|
||||
my_free(1173, &lcc[level].prop_ptr);
|
||||
my_free(1174, &lcc[level].symname);
|
||||
--level;
|
||||
} else {
|
||||
endfile=1;
|
||||
|
|
|
|||
11
src/xinit.c
11
src/xinit.c
|
|
@ -1393,9 +1393,11 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
|||
remove_symbols();
|
||||
my_snprintf(s, S(s), "file normalize \"%s\"", filename);
|
||||
tcleval(s);
|
||||
load_schematic(1, abs_sym_path(tclresult(), ""), 1); /* 20180925.1 */
|
||||
}
|
||||
else {
|
||||
my_strncpy(s, abs_sym_path(tclresult(), ""), S(s));
|
||||
load_schematic(1, s, 1); /* 20180925.1 */
|
||||
Tcl_VarEval(interp, "update_recent_file {", s, "}", NULL);
|
||||
|
||||
} else {
|
||||
char * tmp; /* 20121110 */
|
||||
char filename[PATH_MAX];
|
||||
tmp = (char *) tclgetvar("XSCHEM_START_WINDOW"); /* 20121110 */
|
||||
|
|
@ -1403,6 +1405,9 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
|||
my_strncpy(filename, abs_sym_path(tmp, ""), S(filename));
|
||||
load_schematic(1, filename, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
zoom_full(0, 0); /* Necessary to tell xschem the
|
||||
* initial area to display
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue