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:
@@ -1260,7 +1260,6 @@ bool wxListCtrl::DeleteItem(long item)
|
|||||||
// Deletes all items
|
// Deletes all items
|
||||||
bool wxListCtrl::DeleteAllItems()
|
bool wxListCtrl::DeleteAllItems()
|
||||||
{
|
{
|
||||||
FreeAllInternalData();
|
|
||||||
return ListView_DeleteAllItems(GetHwnd()) != 0;
|
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
|
// notifications - this makes deleting all items from a list ctrl
|
||||||
// much faster
|
// much faster
|
||||||
*result = TRUE;
|
*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;
|
return true;
|
||||||
|
|
||||||
case LVN_ENDLABELEDITA:
|
case LVN_ENDLABELEDITA:
|
||||||
|
Reference in New Issue
Block a user