wxListCtrl::DeleteAllItems() doesn't send notification events (as documented)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-11-16 13:14:06 +00:00
parent bbdc9a8780
commit bffa1c7746
2 changed files with 135 additions and 122 deletions

View File

@ -140,7 +140,10 @@ Deletes all items and all columns.
\func{bool}{DeleteItem}{\param{long }{item}}
Deletes the specified item.
Deletes the specified item. This function sends the
{\tt wxEVT\_COMMAND\_LIST\_DELETE\_ITEM} event for the item being deleted.
See also: \helpref{DeleteAllItems}{wxlistctrldeleteallitems}
\membersection{wxListCtrl::DeleteAllItems}\label{wxlistctrldeleteallitems}
@ -148,6 +151,11 @@ Deletes the specified item.
Deletes all the items in the list control.
{\bf NB:} This function does {\it not} send the
{\tt wxEVT\_COMMAND\_LIST\_DELETE\_ITEM} event because deleting many items
from the control would be too slow then (unlike
\helpref{DeleteItem}{wxlistctrldeleteitem})
\membersection{wxListCtrl::DeleteColumn}\label{wxlistctrldeletecolumn}
\func{bool}{DeleteColumn}{\param{int }{col}}

View File

@ -2316,7 +2316,12 @@ void wxListMainWindow::DeleteAllItems( void )
while (node)
{
wxListLineData *line = (wxListLineData*)node->Data();
DeleteLine( line );
// to make the deletion of all items faster, we don't send the
// notifications in this case: this is compatible with wxMSW and
// documented in DeleteAllItems() description
//DeleteLine( line );
node = node->Next();
}
m_lines.Clear();