diff options
author | surles <surles> | 1999-03-26 20:01:25 (GMT) |
---|---|---|
committer | surles <surles> | 1999-03-26 20:01:25 (GMT) |
commit | 734d6dfcfef07fa622678d9ade5d54093a90a81a (patch) | |
tree | 5d3d389ae78ccf5c9a29d76d483954324f3b5a2b | |
parent | 9bc96b913d4e65e5c3521ced19512c89779a933d (diff) | |
download | tk-734d6dfcfef07fa622678d9ade5d54093a90a81a.zip tk-734d6dfcfef07fa622678d9ade5d54093a90a81a.tar.gz tk-734d6dfcfef07fa622678d9ade5d54093a90a81a.tar.bz2 |
fixed bug in menubutton binding that assumed a menu was attached to the button [Bug 1116]
-rw-r--r-- | library/menu.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/menu.tcl b/library/menu.tcl index 447f220..7cb8292 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -4,7 +4,7 @@ # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # -# RCS: @(#) $Id: menu.tcl,v 1.1.4.4 1999/03/26 19:37:12 surles Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.1.4.5 1999/03/26 20:01:25 surles Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -493,7 +493,7 @@ proc tkMbButtonUp w { set menu [$w cget -menu] set tearoff [expr {($tcl_platform(platform) == "unix") \ - || (($menu != {}) && ([ cget -type] == "tearoff"))}] + || (($menu != {}) && ([$menu cget -type] == "tearoff"))}] if {($tearoff != 0) && ($tkPriv(postedMb) == $w) && ($tkPriv(inMenubutton) == $w)} { tkMenuFirstEntry [$tkPriv(postedMb) cget -menu] |