proc netlist: do not attempt to change a button color if xschem started with -x (no X)

This commit is contained in:
stefan schippers 2023-12-28 23:28:18 +01:00
parent f03a4ff68c
commit 64ca25b9fe
2 changed files with 3 additions and 5 deletions

View File

@ -659,16 +659,14 @@ proc ev0 {args} {
# does netlist post processing, called from global_(spice|vhdl|verilog)_netlist()
proc netlist {source_file show netlist_file} {
global XSCHEM_SHAREDIR flat_netlist netlist_dir simulate_bg
global verilog_2001 debug_var OS verilog_bitblast
global verilog_2001 debug_var OS has_x verilog_bitblas
# if waves are loaded turn Waves button to yellow to indicate old waves are shown
set win_path [xschem get current_win_path]
set top_path [xschem get top_path]
set waves_var tctx::${win_path}_waves
set waves_button $top_path.menubar.waves
if {$waves_var ne $simulate_bg} {
if {[info exists has_x] && $waves_var ne $simulate_bg} {
set $waves_var yellow
$waves_button configure -bg yellow
}

View File

@ -189,7 +189,7 @@ xschem raw_read $netlist_dir/[file tail [file rootname [xschem get current_name]
C {launcher.sym} 870 -90 0 0 {name=h1
descr="Netlist + Simulate
Ctrl-Left-Click"
tclcommand="xschem netlist; xschem simulate"
tclcommand="xschem netlist; simulate"
}
C {simulator_commands.sym} 150 -380 0 0 {name=BATCH_MODE
simulator=ngspice