diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-12 13:03:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-12 13:03:30 (GMT) |
commit | 41c09d4eae90dcdf6a7e1e4a026ba320356e500a (patch) | |
tree | b9ed29964c2c941274ff53c67944b24a8f5f7c2a /library/ttk | |
parent | e76d34cdf6a82f06d8340580557e203f3b3086ef (diff) | |
download | tk-41c09d4eae90dcdf6a7e1e4a026ba320356e500a.zip tk-41c09d4eae90dcdf6a7e1e4a026ba320356e500a.tar.gz tk-41c09d4eae90dcdf6a7e1e4a026ba320356e500a.tar.bz2 |
Backport some clean-up from 8.7
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/notebook.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index 518c6f5..c5e6d94 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -81,9 +81,11 @@ proc ttk::notebook::MnemonicTab {nb key} { foreach tab [$nb tabs] { set label [$nb tab $tab -text] set underline [$nb tab $tab -underline] - set mnemonic [string toupper [string index $label $underline]] - if {$mnemonic ne "" && $mnemonic eq $key} { - return $tab + if {$underline >= 0} { + set mnemonic [string toupper [string index $label $underline]] + if {$mnemonic ne "" && $mnemonic eq $key} { + return $tab + } } } return "" |