X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..17d98558b35b75e3cad68d96841b4fa5a0c7e6ee:/src/common/ctrlsub.cpp diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index d668d66503..68d4b1a591 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -123,7 +123,7 @@ void wxItemContainer::Delete(unsigned int pos) } // ---------------------------------------------------------------------------- -// +// // ---------------------------------------------------------------------------- int wxItemContainer::DoInsertItemsInLoop(const wxArrayStringsAdapter& items, @@ -191,6 +191,18 @@ wxClientData *wxItemContainer::GetClientObject(unsigned int n) const return static_cast(DoGetItemClientData(n)); } +wxClientData *wxItemContainer::DetachClientObject(unsigned int n) +{ + wxClientData * const data = GetClientObject(n); + if ( data ) + { + // reset the pointer as we don't own it any more + DoSetItemClientData(n, NULL); + } + + return data; +} + void wxItemContainer::SetClientData(unsigned int n, void *data) { if ( !HasClientData() )