From 3573fcdafb60050263361c42c8aa54de7d9f93f5 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 24 Sep 2021 00:39:56 +0200 Subject: [PATCH] redraw / update all nodes that might change in copy/move operations if net_name=true --- src/move.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/move.c b/src/move.c index d96120a5..ea58dcfa 100644 --- a/src/move.c +++ b/src/move.c @@ -595,16 +595,15 @@ void copy_objects(int what) { n = xctx->sel_array[i].n; if( xctx->sel_array[i].type == ELEMENT) { - /* int p; - char *type=xctx->sym[xctx->inst[n].ptr].type; */ + int p; + char *type=xctx->sym[xctx->inst[n].ptr].type; /* already done in update_symbol_bboxes() */ /* symbol_bbox(n, &inst[n].x1, &inst[n].y1, &inst[n].x2, &inst[n].y2 ); */ bbox(ADD, inst[n].x1, inst[n].y1, inst[n].x2, inst[n].y2 ); - /* needed?, original objects the copy took place from are unchanged at all */ - /* + /* hash all nodes of copied objects before the copy, they might need update if net_name=true */ if((show_pin_net_names || xctx->hilight_nets) && type && IS_LABEL_OR_PIN(type)) { for(p = 0; p < (inst[n].ptr + xctx->sym)->rects[PINLAYER]; p++) { if( inst[n].node && inst[n].node[p]) { @@ -612,14 +611,10 @@ void copy_objects(int what) } } } - */ } - /* needed?, original objects the copy took place from are unchanged at all */ - /* if((show_pin_net_names || xctx->hilight_nets) && xctx->sel_array[i].type == WIRE) { int_hash_lookup(xctx->node_redraw_table, xctx->wire[n].node, 0, XINSERT_NOREPLACE); } - */ } draw_selection(xctx->gctiled,0); if(show_pin_net_names || xctx->hilight_nets) find_inst_to_be_redrawn(); @@ -1076,13 +1071,12 @@ void move_objects(int what, int merge, double dx, double dy) { n = xctx->sel_array[i].n; if( xctx->sel_array[i].type == ELEMENT) { - /* int p; - char *type=xctx->sym[xctx->inst[n].ptr].type; */ + int p; + char *type=xctx->sym[xctx->inst[n].ptr].type; symbol_bbox(n, &inst[n].x1, &inst[n].y1, &inst[n].x2, &inst[n].y2 ); bbox(ADD, inst[n].x1, inst[n].y1, inst[n].x2, inst[n].y2 ); - /* needed? */ - /* + /* hash all nodes of copied objects before the copy, they might need update if net_name=true */ if((show_pin_net_names || xctx->hilight_nets) && type && IS_LABEL_OR_PIN(type)) { for(p = 0; p < (inst[n].ptr + xctx->sym)->rects[PINLAYER]; p++) { if( inst[n].node && inst[n].node[p]) { @@ -1090,15 +1084,10 @@ void move_objects(int what, int merge, double dx, double dy) } } } - */ } - - /* needed? */ - /* if((show_pin_net_names || xctx->hilight_nets) && xctx->sel_array[i].type == WIRE) { int_hash_lookup(xctx->node_redraw_table, xctx->wire[n].node, 0, XINSERT_NOREPLACE); } - */ } draw_selection(xctx->gctiled,0); if(show_pin_net_names || xctx->hilight_nets) find_inst_to_be_redrawn();