From 258f794f1ae7a80037f69b82aa37a052b981da7b Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 13 Jun 2023 11:56:46 +0200 Subject: [PATCH] set modify/rebuild connectivity/draw only if something changed in break_wires_at_point() and break_wires_at_pins() --- src/check.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/check.c b/src/check.c index 8273a420..b1129974 100644 --- a/src/check.c +++ b/src/check.c @@ -443,9 +443,11 @@ void break_wires_at_point(double x0, double y0) } /* if( (x0!=xctx->wire[i].x1 && x0!=xctx->wire[i].x2) || ... ) */ } /* if( touch(xctx->wire[i].x1, xctx->wire[i].y1, xctx->wire[i].x2, xctx->wire[i].y2, x0,y0) ) */ } /* for(wptr=xctx->wire_spatial_table[sqx][sqy]; wptr; wptr=wptr->next) */ - xctx->need_reb_sel_arr = 1; - rebuild_selected_array(); - draw(); + if(changed) { + xctx->need_reb_sel_arr = 1; + rebuild_selected_array(); + draw(); + } } /* if remove=1 is given wires that are all inside instance bboxes are deleted */ @@ -591,15 +593,17 @@ void break_wires_at_pins(int remove) } } } - set_modify(1); - xctx->prep_net_structs=0; - xctx->prep_hi_structs=0; - xctx->prep_hash_wires=0; - prepare_netlist_structs(0); - if(deleted_wire) { - if(tclgetboolvar("autotrim_wires")) trim_wires(); - update_conn_cues(WIRELAYER, 0, 0); - draw(); + if(changed) { + set_modify(1); + xctx->prep_net_structs=0; + xctx->prep_hi_structs=0; + xctx->prep_hash_wires=0; + prepare_netlist_structs(0); + if(deleted_wire) { + if(tclgetboolvar("autotrim_wires")) trim_wires(); + update_conn_cues(WIRELAYER, 0, 0); + draw(); + } } }