diff options
author | fvogel <fvogelnew1@free.fr> | 2016-10-12 18:34:49 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-10-12 18:34:49 (GMT) |
commit | c8d8fd7d902e15e8785383f77e8a04a5c588ab1e (patch) | |
tree | 4c4334384951dd14ae32fce233e05a15430d7792 /library | |
parent | b4dba7c621c7ec9052d7d6d605aa75c7cccf9ab7 (diff) | |
download | tk-c8d8fd7d902e15e8785383f77e8a04a5c588ab1e.zip tk-c8d8fd7d902e15e8785383f77e8a04a5c588ab1e.tar.gz tk-c8d8fd7d902e15e8785383f77e8a04a5c588ab1e.tar.bz2 |
Fixed [3588460fff] - -typevariable buggy in X11. Patch from Christian Gollwitzer
Diffstat (limited to 'library')
-rw-r--r-- | library/tkfbox.tcl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index a52465a..f73fdc5 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -310,6 +310,7 @@ proc ::tk::dialog::file::Config {dataName type argList} { # 5. Parse the -filetypes option # + set data(origfiletypes) $data(-filetypes) set data(-filetypes) [::tk::FDGetFileTypes $data(-filetypes)] if {![winfo exists $data(-parent)]} { @@ -1119,7 +1120,9 @@ proc ::tk::dialog::file::Done {w {selectFilePath ""}} { && [info exists data(filterType)] && $data(filterType) ne "" } then { upvar #0 $data(-typevariable) typeVariable - set typeVariable [lindex $data(filterType) 0] + set typeVariable [lindex $data(origfiletypes) \ + [lsearch -exact $data(-filetypes) $data(filterType)] 0] + } } bind $data(okBtn) <Destroy> {} |