Merge pull request #6238 from fdelayen/click-top-level-menu

Execute click handlers for top level menu items
This commit is contained in:
Cheng Zhao 2016-06-26 01:59:31 +00:00 committed by GitHub
commit dd7cf3d7b1

View file

@ -145,8 +145,10 @@ void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
int id = source->tag();
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;
}
MenuDelegate menu_delegate(this);
menu_delegate.RunMenu(menu_model_->GetSubmenuModelAt(id), source);