fix regression on input_line tcl procedure. buggy if empty cmd ws passed as argument

This commit is contained in:
stefan schippers 2023-10-17 23:06:49 +02:00
parent 52572a6ca4
commit 8e8145a241
1 changed files with 6 additions and 3 deletions

View File

@ -5032,7 +5032,7 @@ proc swap_compare_schematics {} {
}
}
proc input_line {txt {cmd {}} {preset {}} {w 12}} {
global wm_fix
global wm_fix retval
set retval {}
if { [winfo exists .dialog] } return
xschem set semaphore [expr {[xschem get semaphore] +1}]
@ -5051,9 +5051,12 @@ proc input_line {txt {cmd {}} {preset {}} {w 12}} {
pack .dialog.f1.l .dialog.f1.e -side left
frame .dialog.f2
button .dialog.f2.ok -text OK -command "
if { {$cmd} ne {} } {
eval $cmd \[.dialog.f1.e get\]
set retval [.dialog.f1.e get]
}
set retval \[.dialog.f1.e get\]
destroy .dialog
"
button .dialog.f2.cancel -text Cancel -command { destroy .dialog }