From 1519afa241666ed2d5db6acb3e27fc75ea3d2b05 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sun, 28 Aug 2022 10:23:32 +0200 Subject: [PATCH] various fixes in compare_schematics() --- src/move.c | 11 ++++++----- src/xinit.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/move.c b/src/move.c index 581cad88..fdca7183 100644 --- a/src/move.c +++ b/src/move.c @@ -193,7 +193,7 @@ void draw_selection(GC g, int interruptable) int customfont; #endif - if(g == xctx->gc[SELLAYER]) xctx->movelastsel = xctx->lastsel; + if(g != xctx->gctiled) xctx->movelastsel = xctx->lastsel; for(i=0;imovelastsel;i++) { c = xctx->sel_array[i].col;n = xctx->sel_array[i].n; @@ -437,10 +437,11 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } - for(k=0;kmove_flip, - ( xctx->move_flip && (xctx->inst[n].rot & 1) ) ? xctx->move_rot+2 : xctx->move_rot, - xctx->rx1-xctx->inst[n].x0+xctx->deltax,xctx->ry1-xctx->inst[n].y0+xctx->deltay); + for(k=0;kmove_flip, + ( xctx->move_flip && (xctx->inst[n].rot & 1) ) ? xctx->move_rot+2 : xctx->move_rot, + xctx->rx1-xctx->inst[n].x0+xctx->deltax,xctx->ry1-xctx->inst[n].y0+xctx->deltay); + } break; } #ifdef __unix__ diff --git a/src/xinit.c b/src/xinit.c index aac703ea..d029847d 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -754,7 +754,8 @@ int compare_schematics(const char *f) if(!found) { dbg(1, "schematic 2 instance %d: %s mismatch or not found in schematic 1\n", i, xctx->inst[i].instname ? xctx->inst[i].instname : ""); - select_element(i,SELECTED, 1, 1); + xctx->inst[i].sel = SELECTED; + xctx->need_reb_sel_arr=1; ret = 1; } } @@ -769,7 +770,8 @@ int compare_schematics(const char *f) if(!found) { dbg(1, "schematic 2 net %d: %s mismatch or not found in schematic 1\n", i, xctx->wire[i].prop_ptr ? xctx->wire[i].prop_ptr : ""); - select_wire(i, SELECTED, 1); + xctx->wire[i].sel = SELECTED; + xctx->need_reb_sel_arr=1; ret = 1; } } @@ -795,7 +797,8 @@ int compare_schematics(const char *f) xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); found = int_hash_lookup(table2, s, i, XLOOKUP); if(!found) { - select_element(i,SELECTED, 1, 1); + xctx->inst[i].sel = SELECTED; + xctx->need_reb_sel_arr=1; ret = 1; } } @@ -807,7 +810,8 @@ int compare_schematics(const char *f) xctx->wire[i].x2, xctx->wire[i].y2); found = int_hash_lookup(table2, s, i, XLOOKUP); if(!found) { - select_wire(i, SELECTED, 1); + xctx->wire[i].sel = SELECTED; + xctx->need_reb_sel_arr=1; ret = 1; } }