summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordas <das@noemail.net>2009-04-10 16:08:42 (GMT)
committerdas <das@noemail.net>2009-04-10 16:08:42 (GMT)
commit9f85c5928548375a8a2669af26a492984b1bcf7c (patch)
tree3bbc07f93947edf5c07096c55be7d0f536431361 /library
parentdd56fb89c8178c1619ebf8f1a542fd8e2eb54bdf (diff)
downloadtk-9f85c5928548375a8a2669af26a492984b1bcf7c.zip
tk-9f85c5928548375a8a2669af26a492984b1bcf7c.tar.gz
tk-9f85c5928548375a8a2669af26a492984b1bcf7c.tar.bz2
* library/menu.tcl (::tk::MbPost): fix error thrown in y position
computation with indicatoron. FossilOrigin-Name: 427949f47042322ae0c20ecee66bebf6fae5fd2d
Diffstat (limited to 'library')
-rw-r--r--library/menu.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index 79aa199..b80af90 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.31 2008/09/09 18:17:54 tmh Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.32 2009/04/10 16:08:42 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -307,7 +307,7 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
set x [expr {[winfo rootx $w] - [winfo reqwidth $menu]}]
set y [expr {(2 * [winfo rooty $w] + [winfo height $w]) / 2}]
set entry [MenuFindName $menu [$w cget -text]]
- if {[$w cget -indicatoron]} {
+ if {[$w cget -indicatoron] && $entry ne ""} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
+ [winfo reqheight $menu])/2}]
@@ -327,7 +327,7 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
set x [expr {[winfo rootx $w] + [winfo width $w]}]
set y [expr {(2 * [winfo rooty $w] + [winfo height $w]) / 2}]
set entry [MenuFindName $menu [$w cget -text]]
- if {[$w cget -indicatoron]} {
+ if {[$w cget -indicatoron] && $entry ne ""} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
+ [winfo reqheight $menu])/2}]