fix enable state of menus when the mouse is grabbed by a different window
svn: r6105
This commit is contained in:
parent
047346c1c8
commit
88475bd517
|
@ -758,12 +758,14 @@ void wxMenuBar::Install(wxWindow *for_frame)
|
|||
if (!v) {
|
||||
::DisableMenuItem(mh, 0);
|
||||
} else {
|
||||
if (menu_bar_frame)
|
||||
v = menu_bar_frame->CanAcceptEvent();
|
||||
else
|
||||
if (menu_bar_frame) {
|
||||
/* Don't use CanAcceptEvent(), because that depends on
|
||||
mouse capture, which is too transient for updating menus. */
|
||||
v = menu_bar_frame->IsEnable();
|
||||
} else
|
||||
v = 1;
|
||||
if (!v) {
|
||||
::DisableMenuItem(mh, 0);
|
||||
::DisableMenuItem(mh, 0);
|
||||
} else {
|
||||
::EnableMenuItem(mh, 0);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ void wxMenuItem::SetLabel(char* label)
|
|||
::SetMenuItemHierarchicalID(nmh, macMenuItem, subMenu->cMacMenuId);
|
||||
|
||||
if (!cIsEnabled)
|
||||
DisableMenuItem(nmh, macMenuItem);
|
||||
DisableMenuItem(nmh, macMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user