comments in code
This commit is contained in:
parent
ac398820d9
commit
3cf9d53182
|
|
@ -1625,11 +1625,9 @@ void new_wire(int what, double mx_snap, double my_snap)
|
|||
{
|
||||
static double x1,y1,x2,y2;
|
||||
static double xx1,yy1,xx2,yy2;
|
||||
int savelastwire;
|
||||
|
||||
if( (what & PLACE) ) {
|
||||
if( (ui_state & STARTWIRE) && (x1!=x2 || y1!=y2) ) {
|
||||
savelastwire = lastwire;
|
||||
/*
|
||||
prepared_netlist_structs = 0;
|
||||
prepared_hash_wires = 0;
|
||||
|
|
@ -1676,13 +1674,10 @@ void new_wire(int what, double mx_snap, double my_snap)
|
|||
prepared_hash_wires = 0;
|
||||
prepared_hilight_structs = 0;
|
||||
if(show_pin_net_names) {
|
||||
int w;
|
||||
prepare_netlist_structs(0);
|
||||
find_inst_hash_clear();
|
||||
bbox(BEGIN , 0.0 , 0.0 , 0.0 , 0.0);
|
||||
for(w=savelastwire; w<lastwire; w++) {
|
||||
find_inst_to_be_redrawn(wire[w].node);
|
||||
}
|
||||
find_inst_to_be_redrawn(wire[lastwire-1].node);
|
||||
bbox(SET , 0.0 , 0.0 , 0.0 , 0.0);
|
||||
draw();
|
||||
bbox(END , 0.0 , 0.0 , 0.0 , 0.0);
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ void find_inst_to_be_redrawn(const char *node)
|
|||
|
||||
|
||||
if(int_hash_lookup(nodetable, node, 0, XINSERT_NOREPLACE)) return;
|
||||
|
||||
dbg(1, "find_inst_to_be_redrawn(): node=%s\n", node);
|
||||
for(i=0; i< lastinst; i++) {
|
||||
sym = inst_ptr[i].ptr + instdef;
|
||||
rects = sym->rects[PINLAYER];
|
||||
|
|
|
|||
|
|
@ -783,11 +783,10 @@ void prepare_netlist_structs(int for_netlist)
|
|||
|
||||
|
||||
/* NAME GENERICS */
|
||||
|
||||
|
||||
/* name generic pins from attached labels */
|
||||
dbg(2, "prepare_netlist_structs(): naming generics from attached labels\n");
|
||||
for (i=0;i<lastinst;i++) /* ... assign node fields on all (non label) instances */
|
||||
{
|
||||
if(for_netlist) for (i=0;i<lastinst;i++) { /* ... assign node fields on all (non label) instances */
|
||||
if (inst_ptr[i].ptr<0) continue;
|
||||
my_strdup(267, &type,(inst_ptr[i].ptr+instdef)->type); /* 20150409 */
|
||||
if (type &&
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@ void delete(void)
|
|||
}
|
||||
for(i = 0; i < lastselected; i++) {
|
||||
n = selectedgroup[i].n;
|
||||
/* should be done only for ipin, opin, iopin, label <<<<< */
|
||||
if(selectedgroup[i].type == ELEMENT) {
|
||||
int p;
|
||||
symbol_bbox(n, &inst_ptr[n].x1, &inst_ptr[n].y1, &inst_ptr[n].x2, &inst_ptr[n].y2 ); /* 20171201 */
|
||||
|
|
|
|||
13
src/xinit.c
13
src/xinit.c
|
|
@ -283,6 +283,7 @@ void xwin_exit(void)
|
|||
my_free(1131, &max_polygons); /* 20171115 */
|
||||
my_free(1132, &max_arcs); /* 20171115 */
|
||||
my_free(1133, &max_lines);
|
||||
/* graphic preferences/settings */
|
||||
my_free(1134, &pixmap);
|
||||
my_free(1135, &gc);
|
||||
my_free(1136, &gcstipple);
|
||||
|
|
@ -621,6 +622,7 @@ void alloc_data()
|
|||
fprintf(errfp, "Tcl_AppInit(): calloc error\n");tcleval( "exit");
|
||||
}
|
||||
|
||||
/* graphic preferences/settings */
|
||||
pixmap=my_calloc(636, cadlayers, sizeof(Pixmap));
|
||||
if(pixmap==NULL){
|
||||
fprintf(errfp, "Tcl_AppInit(): calloc error\n");tcleval( "exit");
|
||||
|
|
@ -768,8 +770,8 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen
|
|||
}
|
||||
else if(!strcmp(what, "draw")) {
|
||||
double xor, yor, z;
|
||||
int save_mod, save_ev;
|
||||
|
||||
int save_mod, save_ev, save_show_pin;
|
||||
|
||||
/* save context */
|
||||
xor = xorigin;
|
||||
yor = yorigin;
|
||||
|
|
@ -778,6 +780,8 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen
|
|||
save_mod = modified;
|
||||
save_ev = event_reporting;
|
||||
event_reporting = 0;
|
||||
save_show_pin = show_pin_net_names;
|
||||
show_pin_net_names = 0;
|
||||
my_strncpy(save_name, current_name, S(save_name));
|
||||
my_strdup(117, &saveptr, tclgetvar("current_dirname"));
|
||||
push_undo();
|
||||
|
|
@ -791,8 +795,8 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen
|
|||
remove_symbols();
|
||||
|
||||
/* preview */
|
||||
check_version = 0; /* if set refuse to load and preview anything if not an xschem file */
|
||||
/* heuristics is done in xschem.tcl to ensure it is an xschem file */
|
||||
check_version = 0; /* if set refuse to load and preview anything if not a rel 1.1+ xschem file */
|
||||
/* if not set heuristics is done in xschem.tcl to ensure it is an xschem file */
|
||||
load_schematic(1,filename, 0);
|
||||
window = pre_window;
|
||||
resetwin();
|
||||
|
|
@ -807,6 +811,7 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen
|
|||
my_strncpy(schematic[currentsch] , "", S(schematic[currentsch]));
|
||||
currentsch--;
|
||||
clear_drawing();
|
||||
show_pin_net_names = save_show_pin;
|
||||
pop_undo(0);
|
||||
modified = save_mod;
|
||||
set_modify(modified);
|
||||
|
|
|
|||
Loading…
Reference in New Issue