Skip to content
Snippets Groups Projects
Commit 683cad02 authored by George Nachman's avatar George Nachman
Browse files

Don't reference menuFormRepresentation in...

Don't reference menuFormRepresentation in buildToolbarItemPopUpMenu:forToolbar, which for some reason makes the New button work right in text mode. Fixes bug 995.
parent 10632192
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -250,7 +250,9 @@ NSString *CommandToolbarItem = @"Command";
// Remove menu items because otherwise they will leak (I think items and menus have a cyclic reference?)
// As soon as -[toolbarItem setImage:] is called, the menuFormRepresentation is lost and leaked.
[self _removeItemsFromMenu:[aPopUpButton menu]];
[self _removeItemsFromMenu:[[toolbarItem menuFormRepresentation] submenu]];
// For some reason, making a call to [toolbarItem menuFormRepresentation] here causes the "new tab"
// toolbar item to turn into the icon version so that when it's clicked in text mode the toolbar
// switches into text+icon mode. See bug 995.
[aPopUpButton addItemWithTitle: @""];
 
[iconMenu_ release];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment