select_element(): do not draw selection if fast argument given

This commit is contained in:
stefan schippers 2024-11-03 10:33:11 +01:00
parent e26e03ff0b
commit 0bd6ccef86
2 changed files with 11 additions and 9 deletions

View File

@ -976,14 +976,16 @@ void select_element(int i,unsigned short select_mode, int fast, int override_loc
}
xctx->inst[i].sel = select_mode;
if(select_mode == SELECTED) set_first_sel(ELEMENT, i, 0);
if(select_mode) {
for(c=0;c<cadlayers; ++c) {
draw_temp_symbol(ADD, xctx->gc[SELLAYER], i,c,0,0,0.0,0.0);
}
} else {
symbol_bbox(i, &xctx->inst[i].x1, &xctx->inst[i].y1, &xctx->inst[i].x2, &xctx->inst[i].y2 );
for(c=0;c<cadlayers; ++c) {
draw_temp_symbol(NOW, xctx->gctiled, i,c,0,0,0.0,0.0);
if(!fast) {
if(select_mode) {
for(c=0;c<cadlayers; ++c) {
draw_temp_symbol(ADD, xctx->gc[SELLAYER], i,c,0,0,0.0,0.0);
}
} else {
symbol_bbox(i, &xctx->inst[i].x1, &xctx->inst[i].y1, &xctx->inst[i].x2, &xctx->inst[i].y2 );
for(c=0;c<cadlayers; ++c) {
draw_temp_symbol(NOW, xctx->gctiled, i,c,0,0,0.0,0.0);
}
}
}
xctx->need_reb_sel_arr=1;

View File

@ -73,7 +73,7 @@ proc hier_traversal {fd {level 0} only_subckts} {
set ninst [lindex [split [xschem expandlabel $instname] { }] 1]
for {set n 1} {$n <= $ninst} { incr n} {
# set dp 0
xschem select instance $i
xschem select instance $i fast
# descending ninst times is extremely inefficient
set descended [xschem descend $n notitle]
# ensure previous descend was successful