diff --git a/src/actions.c b/src/actions.c index 1baa9bd3..2b18500c 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1674,6 +1674,7 @@ void new_wire(int what, double mx_snap, double my_snap) hash_wire(XINSERT, xctx->wires-1, 1); /* prepared_hash_wires = 0; */ prepared_hilight_structs = 0; + update_conn_cues(1,1); if(show_pin_net_names) { prepare_netlist_structs(0); diff --git a/src/netlist.c b/src/netlist.c index 42288899..239824ea 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -463,7 +463,7 @@ static void signal_short( char *n1, char *n2) } } -static void wirecheck(int k) /* recursive routine */ +void wirecheck(int k) /* recursive routine */ { int tmpi,tmpj, counti,countj,i,j; int touches; diff --git a/src/save.c b/src/save.c index 56953f18..f79d45be 100644 --- a/src/save.c +++ b/src/save.c @@ -927,6 +927,7 @@ int save_schematic(const char *schname) /* 20171020 added return value */ write_xschem_file(fd); fclose(fd); my_strncpy(xctx->current_name, rel_sym_path(name), S(xctx->current_name)); + /* <<<<< >>>> why clear all these? */ prepared_hilight_structs=0; prepared_netlist_structs=0; prepared_hash_instances=0; diff --git a/src/select.c b/src/select.c index 76f003f8..0edb3cec 100644 --- a/src/select.c +++ b/src/select.c @@ -231,14 +231,16 @@ 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; + char *type = (xctx->inst[n].ptr + xctx->sym)->type; symbol_bbox(n, &xctx->inst[n].x1, &xctx->inst[n].y1, &xctx->inst[n].x2, &xctx->inst[n].y2 ); bbox(ADD, xctx->inst[n].x1, xctx->inst[n].y1, xctx->inst[n].x2, xctx->inst[n].y2 ); - if(show_pin_net_names) for(p = 0; p < (xctx->inst[n].ptr + xctx->sym)->rects[PINLAYER]; p++) { - if( xctx->inst[n].node && xctx->inst[n].node[p]) { - find_inst_to_be_redrawn(xctx->inst[n].node[p]); + if(show_pin_net_names && type && IS_LABEL_OR_PIN(type) ) { + for(p = 0; p < (xctx->inst[n].ptr + xctx->sym)->rects[PINLAYER]; p++) { + if( xctx->inst[n].node && xctx->inst[n].node[p]) { + find_inst_to_be_redrawn(xctx->inst[n].node[p]); + } } } } diff --git a/src/xschem.h b/src/xschem.h index 269139e1..d0f85909 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -302,8 +302,8 @@ extern char win_temp_dir[PATH_MAX]; #define IS_PIN(type) (!(strcmp(type,"ipin") && strcmp(type,"opin") && strcmp(type,"iopin"))) -#define X_TO_SCREEN(x) ( floor((x+xctx->xorigin)* xctx->mooz) ) -#define Y_TO_SCREEN(y) ( floor((y+xctx->yorigin)* xctx->mooz) ) +#define X_TO_SCREEN(x) ( floor(((x)+xctx->xorigin)* xctx->mooz) ) +#define Y_TO_SCREEN(y) ( floor(((y)+xctx->yorigin)* xctx->mooz) ) #define X_TO_XSCHEM(x) ((x)*xctx->zoom -xctx->xorigin) #define Y_TO_XSCHEM(y) ((y)*xctx->zoom -xctx->yorigin) @@ -798,6 +798,7 @@ extern void hash_inst_pin(int what, int i, int j); extern void del_inst_table(void); extern void hash_wires(void); extern void hash_wire(int what, int n, int incremental); +extern void wirecheck(int k); extern void hash_instances(void); /* 20171203 insert instance bbox in spatial hash table */ #ifdef HAS_CAIRO