win: Update menu states when setting menu bar.
This commit is contained in:
parent
22927c9478
commit
0e5f697b48
1 changed files with 1 additions and 0 deletions
|
@ -415,6 +415,7 @@ void NativeWindowWin::OnMenuCommand(int position, HMENU menu) {
|
||||||
|
|
||||||
void NativeWindowWin::SetMenu(ui::MenuModel* menu_model) {
|
void NativeWindowWin::SetMenu(ui::MenuModel* menu_model) {
|
||||||
menu_.reset(new atom::Menu2(menu_model, true));
|
menu_.reset(new atom::Menu2(menu_model, true));
|
||||||
|
menu_->UpdateStates();
|
||||||
::SetMenu(GetNativeWindow(), menu_->GetNativeMenu());
|
::SetMenu(GetNativeWindow(), menu_->GetNativeMenu());
|
||||||
RegisterAccelerators();
|
RegisterAccelerators();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue