From d9bfbff26ffd62981976f699723fa4a267b4b612 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 8 Jan 2021 05:39:43 +0100 Subject: [PATCH] move_objects(): clear lab_show.sym symbols if nets get unhilight after wire deletion --- src/move.c | 16 ++++++++++++++++ src/select.c | 12 +++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/move.c b/src/move.c index 385b2d96..6df31e03 100644 --- a/src/move.c +++ b/src/move.c @@ -1483,6 +1483,22 @@ void move_objects(int what, int merge, double dx, double dy) check_collapsing_objects(); if(autotrim_wires) trim_wires(); update_conn_cues(1, 1); + + + if(xctx->hilight_nets) { + prepare_netlist_structs(0); + for(i=0; i < xctx->instances; i++) { + char *type = (xctx->inst[i].ptr+ xctx->sym)->type; + if(type && xctx->inst[i].node && IS_LABEL_SH_OR_PIN(type)) { + if(!bus_hilight_lookup( xctx->inst[i].node[0], 0, XLOOKUP)) { + xctx->inst[i].color = -10000; + } + } + } + } + + + xctx->ui_state &= ~STARTMOVE; if(xctx->ui_state & STARTMERGE) xctx->ui_state |= SELECTION; /* leave selection state so objects can be deleted */ xctx->ui_state &= ~STARTMERGE; diff --git a/src/select.c b/src/select.c index a12030fa..307b2c63 100644 --- a/src/select.c +++ b/src/select.c @@ -475,12 +475,14 @@ void delete(void) if(autotrim_wires) trim_wires(); del_rect_line_arc_poly(); update_conn_cues(0, 0); - if(xctx->hilight_nets) for(i=0; i < xctx->instances; i++) { - char *type = (xctx->inst[i].ptr+ xctx->sym)->type; + if(xctx->hilight_nets) { prepare_netlist_structs(0); - if(type && xctx->inst[i].node && IS_LABEL_SH_OR_PIN(type)) { - if(!bus_hilight_lookup( xctx->inst[i].node[0], 0, XLOOKUP)) { - xctx->inst[i].color = -10000; + for(i=0; i < xctx->instances; i++) { + char *type = (xctx->inst[i].ptr+ xctx->sym)->type; + if(type && xctx->inst[i].node && IS_LABEL_SH_OR_PIN(type)) { + if(!bus_hilight_lookup( xctx->inst[i].node[0], 0, XLOOKUP)) { + xctx->inst[i].color = -10000; + } } } }