added InitCommandEventWithItems() and call it from wxChoice and wxComboBox code to ensure that per item client data is set correctly in the generated events (replaces patch 1476171; closes bug 1470505)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-06 15:48:27 +00:00
parent 9b7d3c0988
commit 593ac33e50
3 changed files with 17 additions and 8 deletions

View File

@@ -741,10 +741,7 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
if ( n > -1 )
{
event.SetString(GetStringSelection());
if ( HasClientObjectData() )
event.SetClientObject( GetClientObject(n) );
else if ( HasClientUntypedData() )
event.SetClientData( GetClientData(n) );
InitCommandEventWithItems(event, n);
}
ProcessCommand(event);