From 659217148dabd9fa71ac8dc8545284c6dff4e265 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Tue, 11 Jan 2022 02:01:11 +0100 Subject: [PATCH] fix error if tabbed_interface variable set in xschemrc --- src/xinit.c | 2 +- src/xschem.tcl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index a85769e9..c9753e97 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2159,6 +2159,7 @@ int Tcl_AppInit(Tcl_Interp *inter) /* *AFTER* X initialization done */ /* */ if(has_x) { + tclsetintvar("tctx::max_new_windows", MAX_NEW_WINDOWS); tcleval("pack_widgets; set_bindings .drw"); } @@ -2226,7 +2227,6 @@ int Tcl_AppInit(Tcl_Interp *inter) load_schematic(1, fname, !do_netlist); } - tclsetintvar("tctx::max_new_windows", MAX_NEW_WINDOWS); zoom_full(0, 0, 1, 0.97); /* Necessary to tell xschem the initial area to display */ xctx->pending_fullzoom=1; diff --git a/src/xschem.tcl b/src/xschem.tcl index 7104ec30..20db42e6 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -4048,10 +4048,11 @@ proc pack_widgets { { topwin {} } } { pack $topwin.statusbar.8 -side left pack $topwin.statusbar.1 -side left -fill x pack $topwin.menubar -anchor n -side top -fill x + pack $topwin.drw -anchor n -side top -fill both -expand true + setup_tabbed_interface if {$tabbed_interface} { pack $topwin.tabs -fill x -side top -expand false -side top } - pack $topwin.drw -anchor n -side top -fill both -expand true toolbar_show $topwin pack $topwin.statusbar -after $topwin.drw -anchor sw -fill x bind $topwin.statusbar.5 "set cadgrid \[$topwin.statusbar.5 get\]; xschem set cadgrid \$cadgrid" @@ -4569,7 +4570,6 @@ proc build_widgets { {topwin {} } } { focus $topwin.drw if { $topwin == {} } {set rootwin .} else { set rootwin $topwin} - setup_tabbed_interface wm title $rootwin "xschem - " wm iconname $rootwin "xschem - " $rootwin configure -background {}