fix regression on input_line tcl procedure. buggy if empty cmd ws passed as argument
This commit is contained in:
parent
52572a6ca4
commit
8e8145a241
|
|
@ -5032,7 +5032,7 @@ proc swap_compare_schematics {} {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
proc input_line {txt {cmd {}} {preset {}} {w 12}} {
|
proc input_line {txt {cmd {}} {preset {}} {w 12}} {
|
||||||
global wm_fix
|
global wm_fix retval
|
||||||
set retval {}
|
set retval {}
|
||||||
if { [winfo exists .dialog] } return
|
if { [winfo exists .dialog] } return
|
||||||
xschem set semaphore [expr {[xschem get semaphore] +1}]
|
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
|
pack .dialog.f1.l .dialog.f1.e -side left
|
||||||
frame .dialog.f2
|
frame .dialog.f2
|
||||||
|
|
||||||
button .dialog.f2.ok -text OK -command "
|
button .dialog.f2.ok -text OK -command "
|
||||||
eval $cmd \[.dialog.f1.e get\]
|
if { {$cmd} ne {} } {
|
||||||
set retval [.dialog.f1.e get]
|
eval $cmd \[.dialog.f1.e get\]
|
||||||
|
}
|
||||||
|
set retval \[.dialog.f1.e get\]
|
||||||
destroy .dialog
|
destroy .dialog
|
||||||
"
|
"
|
||||||
button .dialog.f2.cancel -text Cancel -command { destroy .dialog }
|
button .dialog.f2.cancel -text Cancel -command { destroy .dialog }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue