]> git.saurik.com Git - wxWidgets.git/commitdiff
wxDataViewCtrl::Expand() only works on items whose parents are already
authorRobert Roebling <robert@roebling.de>
Sat, 23 Oct 2010 14:03:18 +0000 (14:03 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 23 Oct 2010 14:03:18 +0000 (14:03 +0000)
 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

src/generic/datavgen.cpp

index 874a32f2d19a9f8545803eef209dcb89d1d02d2d..6df48842d202f708d8905282d0216a8cc831dd86 100644 (file)
@@ -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);