win: Update menu states when setting menu bar.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 26 May 2014 01:18:19 +0000 (09:18 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 26 May 2014 01:18:19 +0000 (09:18 +0800)
atom/browser/native_window_win.cc

index 2635101..d291682 100644 (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();