fix missing escaping of "[" and "]" in tcl command bound to simulate button. Thanks to Mayank Gupta for pointing out the issue

This commit is contained in:
Stefan Frederik 2021-11-14 11:49:12 +01:00
parent dfb4821ef8
commit 290fc3c793
1 changed files with 1 additions and 1 deletions

View File

@ -3712,7 +3712,7 @@ proc build_widgets { {topwin {} } } {
}
button $topwin.menubar.simulate -text "Simulate" -activebackground red -takefocus 0 -padx 2 -pady 0 \
-command "
if { ![info exists simulate_oldbg] } {
if { !\[info exists simulate_oldbg\] } {
set simulate_oldbg \[$topwin.menubar.simulate cget -bg\]
$topwin.menubar.simulate configure -bg red
simulate \"$topwin.menubar.simulate configure -bg \$simulate_oldbg; unset simulate_oldbg\"