avoid rasiing an error when typing a raw file with some tcl variables (like $netlist_dir/...) in Raw file textbox in graph dialog

This commit is contained in:
stefan schippers 2024-10-24 19:47:28 +02:00
parent 374e05a586
commit f8a676aebf
1 changed files with 6 additions and 1 deletions

View File

@ -2587,7 +2587,12 @@ proc graph_fill_listbox {} {
set pattern [.graphdialog.center.left.search get]
set retval {}
set autoload [uplevel #0 {subst [xschem getprop rect 2 $graph_selected autoload 2]}]
set rawfile [uplevel #0 {subst [xschem getprop rect 2 $graph_selected rawfile 2]}]
set rawfile [xschem getprop rect 2 $graph_selected rawfile]
if {$rawfile ne {}} {
if {![catch {eval uplevel #0 {subst $rawfile}} res]} {
set rawfile $res
}
}
set sim_type [uplevel #0 {subst [xschem getprop rect 2 $graph_selected sim_type 2]}]
if {$autoload ne {} && $autoload } { set autoload read} else {set autoload switch}
# puts "graph_fill_listbox: $rawfile $sim_type"