]> git.saurik.com Git - wxWidgets.git/commitdiff
Return true from wxDataViewMainWindow::ItemDeleted().
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 Oct 2011 13:07:10 +0000 (13:07 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 Oct 2011 13:07:10 +0000 (13:07 +0000)
Presumably, 'false' indicates failure, but there's no failure here: if
an item is not visible, because its parent wasn't expanded yet, it's
perfectly OK that we don't need to do anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index d962bfd8f8ee04235c24c38fa9b6d16f272826ba..1de15c7da8a20714bf4dfab7c79283ead1223188 100644 (file)
@@ -2234,7 +2234,7 @@ bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent,
         // collapsed) item in a tree model. So it's not an error if we don't know
         // about this item, just return without doing anything then.
         if ( !parentNode )
-            return false;
+            return true;
 
         wxCHECK_MSG( parentNode->HasChildren(), false, "parent node doesn't have children?" );
         const wxDataViewTreeNodes& parentsChildren = parentNode->GetChildNodes();
@@ -2265,7 +2265,7 @@ bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent,
             if ( parentNode->GetChildNodes().empty() )
                 parentNode->SetHasChildren(GetModel()->IsContainer(parent));
 
-            return false;
+            return true;
         }
 
         // Delete the item from wxDataViewTreeNode representation: