mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Issue #17532: Prevent exception when changing key sets if Options menu is empty.
This commit is contained in:
		
							parent
							
								
									a6404ad43c
								
							
						
					
					
						commit
						8e8b9ba753
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -821,7 +821,11 @@ def ApplyKeybindings(self): | |||
|                     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') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ned Deily
						Ned Deily