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:
@@ -140,7 +140,10 @@ Deletes all items and all columns.
|
|||||||
|
|
||||||
\func{bool}{DeleteItem}{\param{long }{item}}
|
\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}
|
\membersection{wxListCtrl::DeleteAllItems}\label{wxlistctrldeleteallitems}
|
||||||
|
|
||||||
@@ -148,6 +151,11 @@ Deletes the specified item.
|
|||||||
|
|
||||||
Deletes all the items in the list control.
|
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}
|
\membersection{wxListCtrl::DeleteColumn}\label{wxlistctrldeletecolumn}
|
||||||
|
|
||||||
\func{bool}{DeleteColumn}{\param{int }{col}}
|
\func{bool}{DeleteColumn}{\param{int }{col}}
|
||||||
|
@@ -2316,7 +2316,12 @@ void wxListMainWindow::DeleteAllItems( void )
|
|||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxListLineData *line = (wxListLineData*)node->Data();
|
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();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
m_lines.Clear();
|
m_lines.Clear();
|
||||||
|
Reference in New Issue
Block a user