Fixed creating menu item which is disabled before being attached to the menu.
Menu item should be created in disabled state if wxMenuItem is flagged as disabled. Closes #17282.
This commit is contained in:
@@ -556,6 +556,12 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
mii.wID = id;
|
mii.wID = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( flags & MF_GRAYED )
|
||||||
|
{
|
||||||
|
mii.fMask |= MIIM_STATE;
|
||||||
|
mii.fState = MFS_GRAYED;
|
||||||
|
}
|
||||||
|
|
||||||
if ( flags & MF_CHECKED )
|
if ( flags & MF_CHECKED )
|
||||||
{
|
{
|
||||||
mii.fMask |= MIIM_STATE;
|
mii.fMask |= MIIM_STATE;
|
||||||
|
Reference in New Issue
Block a user