Avoid bug in VS 2015 code generation
When using Whole Program Optimization, pItem->OnDrawItem() incorrectly calls the
base class wxOwnerDrawn::OnDrawItem() instead of the appropriate override, for
example wxCheckListBoxItem::OnDrawItem(). The problem can be avoided by not
using an unnecessary cast to wxListBoxItem*.
(cherry picked from commit 5905857dba
)
This commit is contained in:
@@ -745,7 +745,7 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
|||||||
if ( pStruct->itemID == (UINT)-1 )
|
if ( pStruct->itemID == (UINT)-1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxListBoxItem *pItem = (wxListBoxItem *)m_aItems[pStruct->itemID];
|
wxOwnerDrawn *pItem = m_aItems[pStruct->itemID];
|
||||||
|
|
||||||
wxDCTemp dc((WXHDC)pStruct->hDC);
|
wxDCTemp dc((WXHDC)pStruct->hDC);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user