resolved a slow path introduced in commit db6bee26 / r1406 ( rebuild xctx-<inst[].color after undo/load )
This commit is contained in:
parent
a737e53be4
commit
63a6a8767e
|
|
@ -991,12 +991,12 @@ void draw_hilight_net(int on_window)
|
||||||
{
|
{
|
||||||
int save_draw;
|
int save_draw;
|
||||||
int i,c;
|
int i,c;
|
||||||
struct hilight_hashentry *entry;
|
|
||||||
double x1,y1,x2,y2;
|
double x1,y1,x2,y2;
|
||||||
xSymbol *symptr;
|
xSymbol *symptr;
|
||||||
int use_hash;
|
int use_hash;
|
||||||
struct wireentry *wireptr;
|
struct wireentry *wireptr;
|
||||||
struct instentry *instanceptr;
|
struct instentry *instanceptr;
|
||||||
|
struct hilight_hashentry *entry;
|
||||||
|
|
||||||
if(!xctx->hilight_nets) return;
|
if(!xctx->hilight_nets) return;
|
||||||
dbg(3, "draw_hilight_net(): xctx->prep_hi_structs=%d\n", xctx->prep_hi_structs);
|
dbg(3, "draw_hilight_net(): xctx->prep_hi_structs=%d\n", xctx->prep_hi_structs);
|
||||||
|
|
@ -1045,7 +1045,6 @@ void draw_hilight_net(int on_window)
|
||||||
if(use_hash) init_inst_iterator(x1, y1, x2, y2);
|
if(use_hash) init_inst_iterator(x1, y1, x2, y2);
|
||||||
else i = -1;
|
else i = -1;
|
||||||
while(1) {
|
while(1) {
|
||||||
char *type;
|
|
||||||
if(use_hash) {
|
if(use_hash) {
|
||||||
if( !(instanceptr = inst_iterator_next())) break;
|
if( !(instanceptr = inst_iterator_next())) break;
|
||||||
i = instanceptr->n;
|
i = instanceptr->n;
|
||||||
|
|
@ -1054,12 +1053,6 @@ void draw_hilight_net(int on_window)
|
||||||
i++;
|
i++;
|
||||||
if(i >= xctx->instances) break;
|
if(i >= xctx->instances) break;
|
||||||
}
|
}
|
||||||
type = (xctx->inst[i].ptr+ xctx->sym)->type;
|
|
||||||
/* after an undo xctx->inst[i].color is gone, so rebuild it for labels/pins */
|
|
||||||
if( type && xctx->inst[i].color == 0 && IS_LABEL_SH_OR_PIN(type) ) {
|
|
||||||
entry=bus_hilight_lookup(xctx->inst[i].lab, 0, XLOOKUP);
|
|
||||||
if(entry) xctx->inst[i].color = get_color(entry->value);
|
|
||||||
}
|
|
||||||
if(xctx->inst[i].color )
|
if(xctx->inst[i].color )
|
||||||
{
|
{
|
||||||
symptr = (xctx->inst[i].ptr+ xctx->sym);
|
symptr = (xctx->inst[i].ptr+ xctx->sym);
|
||||||
|
|
|
||||||
|
|
@ -631,6 +631,7 @@ void prepare_netlist_structs(int for_netlist)
|
||||||
double rx1,ry1;
|
double rx1,ry1;
|
||||||
struct wireentry *wptr;
|
struct wireentry *wptr;
|
||||||
struct instpinentry *iptr;
|
struct instpinentry *iptr;
|
||||||
|
struct hilight_hashentry *entry;
|
||||||
int i,j, rects, generic_rects;
|
int i,j, rects, generic_rects;
|
||||||
char *dir=NULL;
|
char *dir=NULL;
|
||||||
char *type=NULL;
|
char *type=NULL;
|
||||||
|
|
@ -1041,6 +1042,16 @@ void prepare_netlist_structs(int for_netlist)
|
||||||
my_free(840, &class);
|
my_free(840, &class);
|
||||||
my_free(841, &global_node);
|
my_free(841, &global_node);
|
||||||
dbg(2, "prepare_netlist_structs(): returning\n");
|
dbg(2, "prepare_netlist_structs(): returning\n");
|
||||||
|
|
||||||
|
if(xctx->hilight_nets) for(i=0;i<xctx->instances;i++){
|
||||||
|
/* after an undo/load/hierarchy descend/return
|
||||||
|
* xctx->inst[i].color is gone, so rebuild it for labels/pins */
|
||||||
|
char *type = (xctx->inst[i].ptr+ xctx->sym)->type;
|
||||||
|
if(type && xctx->inst[i].color == 0 && IS_LABEL_SH_OR_PIN(type) ) {
|
||||||
|
entry=bus_hilight_lookup(xctx->inst[i].lab, 0, XLOOKUP);
|
||||||
|
if(entry) xctx->inst[i].color = get_color(entry->value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int sym_vs_sch_pins()
|
int sym_vs_sch_pins()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue