From: Robert Roebling Date: Sat, 23 Oct 2010 14:03:18 +0000 (+0000) Subject: wxDataViewCtrl::Expand() only works on items whose parents are already X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e3d358bbe4940c85304e9193010b27ba04c9fb86 wxDataViewCtrl::Expand() only works on items whose parents are already expanded. The attached patch fixes this by expanding all ancestors of the item before expanding the item itself. Closes #12585: wxDataviewCtrl::Expand() needs to expand all ancestors git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 874a32f2d1..6df48842d2 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4411,6 +4411,8 @@ int wxDataViewCtrl::GetRowByItem( const wxDataViewItem & item ) const void wxDataViewCtrl::Expand( const wxDataViewItem & item ) { + ExpandAncestors( item ); + int row = m_clientArea->GetRowByItem( item ); if (row != -1) m_clientArea->Expand(row);