Merge pull request #6238 from fdelayen/click-top-level-menu
Execute click handlers for top level menu items
This commit is contained in:
commit
dd7cf3d7b1
1 changed files with 3 additions and 1 deletions
|
@ -145,8 +145,10 @@ void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
|
||||||
|
|
||||||
int id = source->tag();
|
int id = source->tag();
|
||||||
ui::MenuModel::ItemType type = menu_model_->GetTypeAt(id);
|
ui::MenuModel::ItemType type = menu_model_->GetTypeAt(id);
|
||||||
if (type != ui::MenuModel::TYPE_SUBMENU)
|
if (type != ui::MenuModel::TYPE_SUBMENU) {
|
||||||
|
menu_model_->ActivatedAt(id, 0);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MenuDelegate menu_delegate(this);
|
MenuDelegate menu_delegate(this);
|
||||||
menu_delegate.RunMenu(menu_model_->GetSubmenuModelAt(id), source);
|
menu_delegate.RunMenu(menu_model_->GetSubmenuModelAt(id), source);
|
||||||
|
|
Loading…
Reference in a new issue