X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9eee2db810695ae4417e9935475f268bb68bbac..e34dcad290e5129f0e5818fcc89868dd28729b75:/src/os2/choice.cpp diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index 88fff750fb..5ae8def9d9 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -185,6 +185,16 @@ void wxChoice::SetString( ) { SHORT nIndexType = 0; + void* pData; + + if ( m_clientDataItemsType != wxClientData_None ) + { + pData = DoGetItemClientData(n); + } + else // no client data + { + pData = NULL; + } ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, 0); @@ -197,6 +207,13 @@ void wxChoice::SetString( ,(MPARAM)nIndexType ,(MPARAM)rsStr.c_str() ); + + if (pData) + { + DoSetItemClientData( n + ,pData + ); + } } // end of wxChoice::SetString wxString wxChoice::GetString(