X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c6f24145ec676f8943c0133d7568fbea1bb161e..c50a4038e3c3a13e3d493c432017d371d4916ce6:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index d933639972..0eeef36021 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -480,6 +480,8 @@ void wxListCtrl::FreeAllInternalData() m_ignoreChangeMessages = false; m_AnyInternalData = false; + + m_count = 0; } } @@ -1262,6 +1264,7 @@ bool wxListCtrl::DeleteItem(long item) // Deletes all items bool wxListCtrl::DeleteAllItems() { + m_count = 0; return ListView_DeleteAllItems(GetHwnd()) != 0; } @@ -1917,7 +1920,6 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; case LVN_DELETEALLITEMS: - m_count = 0; eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; event.m_itemIndex = -1; break;