From: Cheng Zhao Date: Mon, 26 May 2014 01:18:19 +0000 (+0800) Subject: win: Update menu states when setting menu bar. X-Git-Tag: v0.12.6~1^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0e5f697b4838f8f7a6f951b1a5e4fb684736fcaf;p=electron.git win: Update menu states when setting menu bar. --- diff --git a/atom/browser/native_window_win.cc b/atom/browser/native_window_win.cc index 2635101f..d2916826 100644 --- a/atom/browser/native_window_win.cc +++ b/atom/browser/native_window_win.cc @@ -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();