Issue #17532: merge from 3.3

This commit is contained in:
Ned Deily 2013-07-20 15:08:22 -07:00
commit 237e8f5394
1 changed files with 5 additions and 1 deletions

View File

@ -821,7 +821,11 @@ class EditorWindow(object):
menuEventDict[menu[0]][prepstr(item[0])[1]] = item[1]
for menubarItem in self.menudict:
menu = self.menudict[menubarItem]
end = menu.index(END) + 1
end = menu.index(END)
if end is None:
# Skip empty menus
continue
end += 1
for index in range(0, end):
if menu.type(index) == 'command':
accel = menu.entrycget(index, 'accelerator')