mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 857816: menu.remove() should remove a submenu's menu item too. [r=mfinkle]
This commit is contained in:
parent
d09a387c0e
commit
874d05e5b6
@ -298,6 +298,18 @@ public class GeckoMenu extends ListView
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
// Remove it from any sub-menu.
|
||||
for (GeckoMenuItem menuItem : mItems) {
|
||||
if (menuItem.hasSubMenu()) {
|
||||
SubMenu subMenu = menuItem.getSubMenu();
|
||||
if (subMenu != null && subMenu.findItem(id) != null) {
|
||||
subMenu.removeItem(id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove it from own menu.
|
||||
if (mActionItems.containsKey(item)) {
|
||||
if (mActionItemBarPresenter != null)
|
||||
mActionItemBarPresenter.removeActionItem(mActionItems.get(item));
|
||||
|
Loading…
Reference in New Issue
Block a user