]> git.saurik.com Git - wxWidgets.git/commitdiff
Really delete the item in wxDataViewTreeStore::DeleteItem().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Aug 2012 23:09:29 +0000 (23:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Aug 2012 23:09:29 +0000 (23:09 +0000)
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

index 881fc24cd1248a79d0e4f02a43447695eb04a8f3..69301bc8a189ca6adb8485370d346a0cdc0ea836 100644 (file)
@@ -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 )