Return true from wxDataViewMainWindow::ItemDeleted().

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
This commit is contained in:
Václav Slavík 2011-10-09 13:07:10 +00:00
parent a1a1790666
commit 28fefd45f9

View 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: