diff --git a/src/callback.c b/src/callback.c index a04059d0..281b38f4 100644 --- a/src/callback.c +++ b/src/callback.c @@ -972,16 +972,18 @@ int callback(int event, int mx, int my, KeySym key, if(key=='k' && state==ControlMask) /* unhilight net */ { xRect boundbox; + int big = xctx->wires> 2000 || xctx->instances > 2000 ; if(semaphore >= 2) break; - calc_drawing_bbox(&boundbox, 2); - + if(!big) calc_drawing_bbox(&boundbox, 2); unhilight_net(); /* undraw_hilight_net(1); */ - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); break; } if(key=='K' && state==(ControlMask|ShiftMask)) /* hilight net drilling thru elements */ @@ -1006,16 +1008,19 @@ int callback(int event, int mx, int my, KeySym key, if(key=='K' && state == ShiftMask) /* delete hilighted nets */ { xRect boundbox; + int big = xctx->wires> 2000 || xctx->instances > 2000 ; if(semaphore >= 2) break; enable_drill=0; - calc_drawing_bbox(&boundbox, 2); + if(!big) calc_drawing_bbox(&boundbox, 2); delete_hilight_net(); /* undraw_hilight_net(1); */ - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); break; } if(key=='g' && state==Mod1Mask) { /* highlight net and send to gaw viewer */ @@ -1698,14 +1703,17 @@ int callback(int event, int mx, int my, KeySym key, xRect boundbox; if(auto_hilight && hilight_nets && sel == 0 ) { /* 20160413 20160503 */ if(!prev_last_sel) { - calc_drawing_bbox(&boundbox, 2); + int big = xctx->wires> 2000 || xctx->instances > 2000 ; + if(!big) calc_drawing_bbox(&boundbox, 2); delete_hilight_net(); /* undraw_hilight_net(1); */ - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } } } diff --git a/src/hilight.c b/src/hilight.c index f816e52f..677c83d3 100644 --- a/src/hilight.c +++ b/src/hilight.c @@ -881,13 +881,16 @@ void unhilight_net(void) void redraw_hilights(void) { xRect boundbox; + int big = xctx->wires> 2000 || xctx->instances > 2000 ; if(!has_x) return; - calc_drawing_bbox(&boundbox, 2); - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + calc_drawing_bbox(&boundbox, 2); + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } void draw_hilight_net(int on_window) diff --git a/src/scheduler.c b/src/scheduler.c index e19bb065..b91a578b 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1423,15 +1423,18 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg else if(!strcmp(argv[1],"unhilight")) { xRect boundbox; + int big = xctx->wires> 2000 || xctx->instances > 2000 ; enable_drill=0; - calc_drawing_bbox(&boundbox, 2); + if(!big) calc_drawing_bbox(&boundbox, 2); delete_hilight_net(); /* undraw_hilight_net(1); */ - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); /* enable_drill = 0; diff --git a/src/token.c b/src/token.c index b963c6fc..3e5d1fd9 100644 --- a/src/token.c +++ b/src/token.c @@ -180,19 +180,22 @@ void check_unique_names(int rename) char *comma_pos; char *expanded_instname = NULL; struct inst_hashentry *entry; + int big = xctx->wires> 2000 || xctx->instances > 2000; /* int save_draw; */ if(hilight_nets) { xRect boundbox; - calc_drawing_bbox(&boundbox, 2); + if(!big) calc_drawing_bbox(&boundbox, 2); enable_drill=0; delete_hilight_net(); /* undraw_hilight_net(1); */ - bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); - bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); - bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) { + bbox(BEGIN, 0.0 , 0.0 , 0.0 , 0.0); + bbox(ADD, boundbox.x1, boundbox.y1, boundbox.x2, boundbox.y2); + bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); + } draw(); - bbox(END , 0.0 , 0.0 , 0.0 , 0.0); + if(!big) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } inst_free_hash(table); first = 1;