fixes the invalid index problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6dd2244b9d
commit
49884e3e0d
@ -294,7 +294,7 @@ void wxListBox::Append(const wxString& item)
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
if ( m_windowStyle & wxLB_OWNERDRAW ) {
|
||||
wxOwnerDrawn *pNewItem = CreateItem(-1); // dummy argument
|
||||
wxOwnerDrawn *pNewItem = CreateItem(index); // dummy argument
|
||||
pNewItem->SetName(item);
|
||||
m_aItems.Add(pNewItem);
|
||||
ListBox_SetItemData(hwnd, index, pNewItem);
|
||||
|
Loading…
Reference in New Issue
Block a user