X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa61d3525370a9b9fa8c797d9b7f89d96994db5f..a4609ab847819b47c996674420871f4514d50625:/src/common/ctrlsub.cpp diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index d2bc3e8ef2..c94e8f2ca3 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -172,6 +172,23 @@ void *wxItemContainer::GetClientData(unsigned int n) const return DoGetItemClientData(n); } +// ============================================================================ +// wxControlWithItems implementation +// ============================================================================ + +void wxControlWithItems::InitCommandEventWithItems(wxCommandEvent& event, int n) +{ + InitCommandEvent(event); + + if ( n != wxNOT_FOUND ) + { + if ( HasClientObjectData() ) + event.SetClientObject(GetClientObject(n)); + else if ( HasClientUntypedData() ) + event.SetClientData(GetClientData(n)); + } +} + wxControlWithItems::~wxControlWithItems() { // this destructor is required for Darwin