Forgot DeleteChildren()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1803,18 +1803,7 @@ void wxDataViewTreeStore::DeleteChildren( const wxDataViewItem& item )
|
||||
wxDataViewTreeStoreContainerNode *node = FindContainerNode( item );
|
||||
if (!node) return;
|
||||
|
||||
wxDataViewItemArray array;
|
||||
wxDataViewTreeStoreNodeList::iterator iter;
|
||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||
{
|
||||
wxDataViewTreeStoreNode* child = *iter;
|
||||
array.Add( child->GetItem() );
|
||||
}
|
||||
|
||||
node->GetChildren().clear();
|
||||
|
||||
// notify control
|
||||
ItemsDeleted( item, array );
|
||||
}
|
||||
|
||||
void wxDataViewTreeStore::DeleteAllItems()
|
||||
@@ -2134,7 +2123,21 @@ void wxDataViewTreeCtrl::DeleteItem( const wxDataViewItem& item )
|
||||
|
||||
void wxDataViewTreeCtrl::DeleteChildren( const wxDataViewItem& item )
|
||||
{
|
||||
GetStore()->DeleteChildren(item);
|
||||
wxDataViewTreeStoreContainerNode *node = GetStore()->FindContainerNode( item );
|
||||
if (!node) return;
|
||||
|
||||
wxDataViewItemArray array;
|
||||
wxDataViewTreeStoreNodeList::iterator iter;
|
||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||
{
|
||||
wxDataViewTreeStoreNode* child = *iter;
|
||||
array.Add( child->GetItem() );
|
||||
}
|
||||
|
||||
GetStore()->DeleteChildren( item );
|
||||
|
||||
// notify control
|
||||
GetStore()->ItemsDeleted( item, array );
|
||||
}
|
||||
|
||||
void wxDataViewTreeCtrl::DeleteAllItems()
|
||||
|
Reference in New Issue
Block a user