Tk Source Code

View Ticket
Login
Ticket UUID: 3152603
Title: Cascade entry stops working if reconfigured with same -menu
Type: Bug Version: obsolete: 8.5.9
Submitter: sbron Created on: 2011-01-06 20:37:11
Subsystem: 12. Unix Menus Assigned To: tmh
Priority: 5 Medium Severity:
Status: Open Last Modified: 2011-01-06 20:37:11
Resolution: None Closed By:
    Closed on:
Description:
When a cascade menu entry is reconfigured with its current value for -menu, the
submenu is no longer responsive to mouse actions. The problems seems to be that
the -menu option on the cloned menu gets updated to the non-cloned submenu. The
following code demonstrates the problem:

. configure -menu [menu .menu]
.menu add cascade -label Sub -menu [menu .menu.sub]
.menu.sub add command -label Foo
.menu.sub add command -label Bar
# At this point the submenu works as expected
puts [.#menu entrycget end -menu]
# -> .#menu.#menu#sub
.menu entryconfigure end -menu .menu.sub
puts [.#menu entrycget end -menu]
# -> .menu.sub
# The submenu does not respond to mouse actions.

Linux 2.6.34.7 x86_64 with Tcl/Tk compiled from sources. 
I found the problem on Tk 8.5.9, but could reproduce on a fairly recent 8.6b1.2.

This is a different issue from bug #1723059