From aeafaf5052fca24e167b063e3bc4e7be88477315 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 6 Nov 2023 19:14:32 +0100 Subject: [PATCH] execute_fileevent: delete ..*simulate_id only if called from related id --- src/xschem.tcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index 5ccf0066..8a67f722 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -270,7 +270,11 @@ proc execute_fileevent {id} { if {[info exists execute(callback,$id)] && $execute(callback,$id) ne {}} { eval uplevel #0 [list $execute(callback,$id)] } - catch {unset tctx::[xschem get current_win_path]_simulate_id} + if { [info exists tctx::[xschem get current_win_path]_simulate_id] } { + if { [set tctx::[xschem get current_win_path]_simulate_id] eq $id } { + unset tctx::[xschem get current_win_path]_simulate_id + } + } catch {unset execute(callback,$id)} set execute(cmd,last) $execute(cmd,$id) set execute(data,last) $execute(data,$id)