Corrected a toolkit error where the callback to check parameter
bounds should be called whenever an entry is changed and either the entry window loses focus or the <Enter> key is pressed. This had ended up disabled when the scrollbar was added to the dialog window, causing the window hierarchy to change, which invalidated the regexp used to identify the entry and checkbox widgets.
This commit is contained in:
parent
088bb828ac
commit
b156e79b2c
|
|
@ -590,11 +590,11 @@ proc magic::gencell_getparams {} {
|
|||
set parameters [dict create]
|
||||
set slist [grid slaves .params.body.area.edits]
|
||||
foreach s $slist {
|
||||
if {[regexp {^.params.body.area.edits.(.*)_ent$} $s valid pname] != 0} {
|
||||
if {[regexp {^\.params\.body\.area\.edits\.(.*)_ent$} $s valid pname] != 0} {
|
||||
set value [subst \$magic::${pname}_val]
|
||||
} elseif {[regexp {^.params.body.area.edits.(.*)_chk$} $s valid pname] != 0} {
|
||||
} elseif {[regexp {^\.params\.body\.area\.edits\.(.*)_chk$} $s valid pname] != 0} {
|
||||
set value [subst \$magic::${pname}_val]
|
||||
} elseif {[regexp {^.params.body.area.edits.(.*)_sel$} $s valid pname] != 0} {
|
||||
} elseif {[regexp {^\.params\.body\.area\.edits\.(.*)_sel$} $s valid pname] != 0} {
|
||||
set value [subst \$magic::${pname}_val]
|
||||
}
|
||||
dict set parameters $pname $value
|
||||
|
|
@ -1035,7 +1035,7 @@ proc magic::add_entry {pname ptext parameters} {
|
|||
proc magic::add_check_callbacks {gencell_type library} {
|
||||
set wlist [winfo children .params.body.area.edits]
|
||||
foreach w $wlist {
|
||||
if {[regexp {\.params\.edits\.(.+)_ent} $w valid pname]} {
|
||||
if {[regexp {\.params\.body\.area\.edits\.(.+)_ent} $w valid pname]} {
|
||||
# Add callback on enter or focus out
|
||||
bind $w <Return> \
|
||||
"magic::update_dialog {} $pname $gencell_type $library"
|
||||
|
|
|
|||
Loading…
Reference in New Issue