optimization in delete() if show_pin_net_names is true, recheck connected elements only if deleting a pin or label.
This commit is contained in:
parent
632dbd8931
commit
f38a7d82ea
|
|
@ -1674,6 +1674,7 @@ void new_wire(int what, double mx_snap, double my_snap)
|
||||||
hash_wire(XINSERT, xctx->wires-1, 1);
|
hash_wire(XINSERT, xctx->wires-1, 1);
|
||||||
/* prepared_hash_wires = 0; */
|
/* prepared_hash_wires = 0; */
|
||||||
prepared_hilight_structs = 0;
|
prepared_hilight_structs = 0;
|
||||||
|
|
||||||
update_conn_cues(1,1);
|
update_conn_cues(1,1);
|
||||||
if(show_pin_net_names) {
|
if(show_pin_net_names) {
|
||||||
prepare_netlist_structs(0);
|
prepare_netlist_structs(0);
|
||||||
|
|
|
||||||
|
|
@ -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 tmpi,tmpj, counti,countj,i,j;
|
||||||
int touches;
|
int touches;
|
||||||
|
|
|
||||||
|
|
@ -927,6 +927,7 @@ int save_schematic(const char *schname) /* 20171020 added return value */
|
||||||
write_xschem_file(fd);
|
write_xschem_file(fd);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
my_strncpy(xctx->current_name, rel_sym_path(name), S(xctx->current_name));
|
my_strncpy(xctx->current_name, rel_sym_path(name), S(xctx->current_name));
|
||||||
|
/* <<<<< >>>> why clear all these? */
|
||||||
prepared_hilight_structs=0;
|
prepared_hilight_structs=0;
|
||||||
prepared_netlist_structs=0;
|
prepared_netlist_structs=0;
|
||||||
prepared_hash_instances=0;
|
prepared_hash_instances=0;
|
||||||
|
|
|
||||||
10
src/select.c
10
src/select.c
|
|
@ -231,14 +231,16 @@ void delete(void)
|
||||||
}
|
}
|
||||||
for(i = 0; i < lastselected; i++) {
|
for(i = 0; i < lastselected; i++) {
|
||||||
n = selectedgroup[i].n;
|
n = selectedgroup[i].n;
|
||||||
/* should be done only for ipin, opin, iopin, label <<<<< */
|
|
||||||
if(selectedgroup[i].type == ELEMENT) {
|
if(selectedgroup[i].type == ELEMENT) {
|
||||||
int p;
|
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 );
|
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 );
|
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(show_pin_net_names && type && IS_LABEL_OR_PIN(type) ) {
|
||||||
if( xctx->inst[n].node && xctx->inst[n].node[p]) {
|
for(p = 0; p < (xctx->inst[n].ptr + xctx->sym)->rects[PINLAYER]; p++) {
|
||||||
find_inst_to_be_redrawn(xctx->inst[n].node[p]);
|
if( xctx->inst[n].node && xctx->inst[n].node[p]) {
|
||||||
|
find_inst_to_be_redrawn(xctx->inst[n].node[p]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 IS_PIN(type) (!(strcmp(type,"ipin") && strcmp(type,"opin") && strcmp(type,"iopin")))
|
||||||
|
|
||||||
|
|
||||||
#define X_TO_SCREEN(x) ( floor((x+xctx->xorigin)* 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 Y_TO_SCREEN(y) ( floor(((y)+xctx->yorigin)* xctx->mooz) )
|
||||||
#define X_TO_XSCHEM(x) ((x)*xctx->zoom -xctx->xorigin)
|
#define X_TO_XSCHEM(x) ((x)*xctx->zoom -xctx->xorigin)
|
||||||
#define Y_TO_XSCHEM(y) ((y)*xctx->zoom -xctx->yorigin)
|
#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 del_inst_table(void);
|
||||||
extern void hash_wires(void);
|
extern void hash_wires(void);
|
||||||
extern void hash_wire(int what, int n, int incremental);
|
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 */
|
extern void hash_instances(void); /* 20171203 insert instance bbox in spatial hash table */
|
||||||
|
|
||||||
#ifdef HAS_CAIRO
|
#ifdef HAS_CAIRO
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue