Hiding the TEXT layer will disable only symbol texts on that layer, not all texts, `proc select_layers` make the widget non-modal

This commit is contained in:
stefan schippers 2025-01-16 20:37:19 +01:00
parent ca6b8fe85b
commit c57c49fde8
2 changed files with 10 additions and 4 deletions

View File

@ -561,7 +561,6 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
disabled = 1;
}
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
if(!has_x) return;
if( (xctx->inst[n].flags & HIDE_INST) ||
(xctx->hide_symbols==1 && (xctx->inst[n].ptr+ xctx->sym)->prop_ptr &&
@ -620,6 +619,9 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
x0=xctx->inst[n].x0 + xoffset;
y0=xctx->inst[n].y0 + yoffset;
symptr = (xctx->inst[n].ptr+ xctx->sym);
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) goto draw_texts;
if(!hide) {
for(j=0;j< symptr->lines[layer]; ++j)
{
@ -713,6 +715,9 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
}
}
}
draw_texts:
if(
!(xctx->inst[n].flags & HIDE_SYMBOL_TEXTS) &&
(

View File

@ -5129,7 +5129,7 @@ proc tclcmd {} {
proc select_layers {} {
global dark_colorscheme enable_layer
xschem set semaphore [expr {[xschem get semaphore] +1}]
# xschem set semaphore [expr {[xschem get semaphore] +1}]
toplevel .sl -class Dialog
wm transient .sl [xschem get topwindow]
if { $dark_colorscheme == 1 } {
@ -5182,6 +5182,7 @@ proc select_layers {} {
-selectcolor $ind_bg -anchor w -foreground $layfg -background $i -activebackground $i \
-command {
xschem enable_layers
xschem redraw
}
pack .sl.f0.f$f.cb$j -side top -fill x
incr j
@ -5191,8 +5192,8 @@ proc select_layers {} {
pack .sl.f0.f$f -side left -fill y
}
}
tkwait window .sl
xschem set semaphore [expr {[xschem get semaphore] -1}]
# tkwait window .sl
# xschem set semaphore [expr {[xschem get semaphore] -1}]
}
proc color_dim {} {