summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6c0d5a6)
The item being inserted is not inserted yet when we call
SetOwnerDrawnMenuItem() so we must call it separately for it after inserting
it.
Closes #15437.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74717
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// check if we have something more than a simple text item
#if wxUSE_OWNER_DRAWN
// check if we have something more than a simple text item
#if wxUSE_OWNER_DRAWN
+ bool makeItemOwnerDrawn = false;
if ( pItem->IsOwnerDrawn() )
{
#ifndef __DMC__
if ( pItem->IsOwnerDrawn() )
{
#ifndef __DMC__
// set menu as ownerdrawn
m_ownerDrawn = true;
// set menu as ownerdrawn
m_ownerDrawn = true;
+ // also ensure that the new item itself is made owner drawn
+ makeItemOwnerDrawn = true;
+
ResetMaxAccelWidth();
}
// only update our margin for equals alignment to other item
ResetMaxAccelWidth();
}
// only update our margin for equals alignment to other item
+
+ if ( makeItemOwnerDrawn )
+ {
+ SetOwnerDrawnMenuItem(GetHmenu(), pos,
+ reinterpret_cast<ULONG_PTR>(pItem), TRUE);
+ }