From a73a80a9879a1781a230fa40749f16975b0670e4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Aug 2012 23:09:29 +0000 Subject: [PATCH] Really delete the item in wxDataViewTreeStore::DeleteItem(). For some incomprehensible reason only child branches were ever deleted from the list of parents children in DeleteItem(), not simple tree items. This meant that reexpanding a node after deleting all its children showed the previously "deleted" children again. Closes #14574. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datavcmn.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 881fc24cd1..69301bc8a1 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -2184,10 +2184,7 @@ void wxDataViewTreeStore::DeleteItem( const wxDataViewItem& item ) wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent_item ); if (!parent_node) return; - wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); - if (!node) return; - - parent_node->GetChildren().DeleteObject( node ); + parent_node->GetChildren().DeleteObject( FindNode(item) ); } void wxDataViewTreeStore::DeleteChildren( const wxDataViewItem& item ) -- 2.45.2