X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa61d3525370a9b9fa8c797d9b7f89d96994db5f..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/ctrlsub.cpp?ds=sidebyside 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