don't free user data before sending wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, this prevents user from doing cleanup in his OnDeleteAllItems() handler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-09-23 10:07:25 +00:00
parent c68f590a2a
commit f7df21aadf

View File

@ -1260,7 +1260,6 @@ bool wxListCtrl::DeleteItem(long item)
// Deletes all items
bool wxListCtrl::DeleteAllItems()
{
FreeAllInternalData();
return ListView_DeleteAllItems(GetHwnd()) != 0;
}
@ -2170,6 +2169,10 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
// notifications - this makes deleting all items from a list ctrl
// much faster
*result = TRUE;
// also, we may free all user data now (couldn't do it before as
// the user should have access to it in OnDeleteAllItems() handler)
FreeAllInternalData();
return true;
case LVN_ENDLABELEDITA: