allow changing of the label of a submenu. r=saari/sr=smfr/a=asa. bug# 97549.

This commit is contained in:
pinkerton%netscape.com 2001-09-06 22:48:18 +00:00
parent 42a25f889c
commit 67221e8f7e

View File

@ -1484,8 +1484,14 @@ nsMenu::AttributeChanged(nsIDocument *aDocument, PRInt32 aNameSpaceID, nsIAtom *
mMenuContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, mLabel);
if((mMacMenuID <= 5) && (mMacMenuID >= 2))
// if we're a submenu, we don't have to go through all the gymnastics below
// to remove ourselves from the menubar and re-add the menu. We just invalidate
// our parent to change the text of the item.
if((mMacMenuID <= 5) && (mMacMenuID >= 2)) {
nsCOMPtr<nsIMenuListener> listener = do_QueryInterface(mParent);
listener->SetRebuild(PR_TRUE);
return NS_OK;
}
::DeleteMenu(mMacMenuID);