diff --git a/src/actions.c b/src/actions.c index d18d2160..4f61fdfd 100644 --- a/src/actions.c +++ b/src/actions.c @@ -143,7 +143,7 @@ const char *get_text_floater(int i) int set_modify(int mod) { int i, floaters = 0; - + dbg(1, "set_modify(): %d, prev_set_modify=%d\n", mod, xctx->prev_set_modify); /* set modify state */ @@ -158,8 +158,8 @@ int set_modify(int mod) tclvareval("set tctx::", xctx->current_win_path, "_netlist $simulate_bg", NULL); my_snprintf(s, S(s), "tctx::%s_simulate_id", xctx->current_win_path); if(tclgetvar(s)) { - tclvareval(xctx->top_path, ".menubar.simulate configure -bg orange", NULL); - tclvareval("set tctx::", xctx->current_win_path, "_simulate orange", NULL); + tclvareval(xctx->top_path, ".menubar.simulate configure -bg ", tclresult(), NULL); + tclvareval("set tctx::", xctx->current_win_path, "_simulate ", tclresult(), NULL); } else { tclvareval(xctx->top_path, ".menubar.simulate configure -bg $simulate_bg", NULL); tclvareval("set tctx::", xctx->current_win_path, "_simulate $simulate_bg", NULL); diff --git a/src/xschem.tcl b/src/xschem.tcl index b61f7772..5d410ba5 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -285,6 +285,12 @@ proc execute_fileevent {id} { } set execute(exitcode,last) $exit_status set execute(exitcode,$id) $exit_status + set execute(cmd,last) $execute(cmd,$id) + set execute(win_path,last) $execute(win_path,$id) + set execute(data,last) $execute(data,$id) + if { ![info exists err] } { set err {} } + set execute(error,last) $err + set execute(status,last) $execute(status,$id) if {[info exists execute(callback,$id)] && $execute(callback,$id) ne {}} { # puts $execute(callback,$id) # puts $execute(win_path,$id) @@ -296,12 +302,6 @@ proc execute_fileevent {id} { } } catch {unset execute(callback,$id)} - set execute(cmd,last) $execute(cmd,$id) - set execute(win_path,last) $execute(win_path,$id) - set execute(data,last) $execute(data,$id) - if { ![info exists err] } { set err {} } - set execute(error,last) $err - set execute(status,last) $execute(status,$id) if { ![info exists exit_status] } { set exit_status 0 } unset execute(pipe,$id) unset execute(data,$id) @@ -2014,8 +2014,6 @@ proc simulate {{callback {}}} { set_simulate_button [list [xschem get top_path] [xschem get current_win_path]] $callback " - # puts $cmd - if {$fg eq {execute_wait}} {xschem set semaphore [expr {[xschem get semaphore] +1}]} set save [pwd] @@ -7002,12 +7000,12 @@ proc set_simulate_button {top_path winpath} { set simvar tctx::${winpath}_simulate set sim_button $top_path.menubar.simulate - # puts "current_win=$current_win" - # puts "simvar=$simvar" - # puts "winpath=$winpath" - # puts "top_path=$top_path" - # puts "sim_button=$sim_button" - # puts "execute(exitcode,last)=$execute(exitcode,last)" + # puts "current_win=|$current_win|" + # puts "simvar=|$simvar|" + # puts "winpath=|$winpath|" + # puts "top_path=|$top_path|" + # puts "sim_button=|$sim_button|" + # puts "execute(exitcode,last)=|$execute(exitcode,last)|" if {![info exists execute(exitcode,last)]} { if { $current_win eq $winpath} { diff --git a/src/xschemrc b/src/xschemrc index 361f4634..ec352cea 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -480,7 +480,6 @@ # xschem raw read $netlist_dir/solar_panel.raw # xschem redraw # } -# xschem raw read $netlist_dir/solar_panel.raw # viewdata $messages ro # }