From b8fecf997b6b14044813eefa9f9dd6c4c2ac2a28 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 5 Dec 2023 17:32:48 +0100 Subject: [PATCH] avoid showing alert box if enabling / disabling stretch mode by bindkey --- src/callback.c | 2 -- src/draw.c | 2 +- src/xschem.tcl | 12 ++++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/callback.c b/src/callback.c index a393daf1..e85cae79 100644 --- a/src/callback.c +++ b/src/callback.c @@ -1921,11 +1921,9 @@ int rstate; /* (reduced state, without ShiftMask) */ en_s = !en_s; if(en_s) { - tcleval("alert_ { enabling stretch mode } {}"); tclsetvar("enable_stretch","1"); } else { - tcleval("alert_ { disabling stretch mode } {}"); tclsetvar("enable_stretch","0"); } break; diff --git a/src/draw.c b/src/draw.c index a64b556f..4485c562 100644 --- a/src/draw.c +++ b/src/draw.c @@ -422,7 +422,7 @@ void get_sym_text_size(int inst, int text_n, double *xscale, double *yscale) int sym_n = xctx->inst[inst].ptr; if(sym_n >= 0 && xctx->sym[sym_n].texts > text_n) { - if(strstr(xctx->inst[inst].prop_ptr, "text_size_")) { + if(xctx->inst[inst].prop_ptr && strstr(xctx->inst[inst].prop_ptr, "text_size_")) { my_snprintf(attr, S(attr), "text_size_%d", text_n); ts = get_tok_value(xctx->inst[inst].prop_ptr, attr, 0); } else { diff --git a/src/xschem.tcl b/src/xschem.tcl index 64d481f9..88eb1955 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -6730,6 +6730,8 @@ proc pack_widgets { { topwin {} } } { pack $topwin.statusbar.5 -side left pack $topwin.statusbar.6 -side left pack $topwin.statusbar.7 -side left + pack $topwin.statusbar.10 -side left + pack $topwin.statusbar.9 -side left pack $topwin.statusbar.8 -side left pack $topwin.statusbar.1 -side left -fill x pack $topwin.menubar -side top -fill x @@ -7480,13 +7482,15 @@ tclcommand=\"xschem raw_read \$netlist_dir/[file tail [file rootname [xschem get label $topwin.statusbar.1 -text "STATUS BAR 1" label $topwin.statusbar.2 -text "SNAP:" entry $topwin.statusbar.3 -relief sunken -bg white \ - -width 10 -foreground black -takefocus 0 + -width 7 -foreground black -takefocus 0 label $topwin.statusbar.4 -text "GRID:" entry $topwin.statusbar.5 -relief sunken -bg white \ - -width 10 -foreground black -takefocus 0 - label $topwin.statusbar.6 -text "NETLIST MODE:" + -width 7 -foreground black -takefocus 0 + label $topwin.statusbar.6 -text "MODE:" label $topwin.statusbar.7 -relief sunken -bg white \ - -width 8 + -width 7 + label $topwin.statusbar.10 -text {Stretch:} + label $topwin.statusbar.9 -textvariable enable_stretch label $topwin.statusbar.8 -activebackground red -text {} }