win: Update menu states when setting menu bar.

This commit is contained in:
Cheng Zhao 2014-05-26 09:18:19 +08:00
parent 22927c9478
commit 0e5f697b48

View file

@ -415,6 +415,7 @@ void NativeWindowWin::OnMenuCommand(int position, HMENU menu) {
void NativeWindowWin::SetMenu(ui::MenuModel* menu_model) {
menu_.reset(new atom::Menu2(menu_model, true));
menu_->UpdateStates();
::SetMenu(GetNativeWindow(), menu_->GetNativeMenu());
RegisterAccelerators();