Invalidate wxDataViewCtrl bests widths on expand/collapse.
The best column widths are computed from "realized" items that are available as rows in wxDataViewCtrl. This information changes when a previously collapsed node is expanded and new items become available for column width calculation. Fixes #14167. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5082,14 +5082,20 @@ void wxDataViewCtrl::Expand( const wxDataViewItem & item )
|
||||
|
||||
int row = m_clientArea->GetRowByItem( item );
|
||||
if (row != -1)
|
||||
{
|
||||
m_clientArea->Expand(row);
|
||||
InvalidateColBestWidths();
|
||||
}
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::Collapse( const wxDataViewItem & item )
|
||||
{
|
||||
int row = m_clientArea->GetRowByItem( item );
|
||||
if (row != -1)
|
||||
{
|
||||
m_clientArea->Collapse(row);
|
||||
InvalidateColBestWidths();
|
||||
}
|
||||
}
|
||||
|
||||
bool wxDataViewCtrl::IsExpanded( const wxDataViewItem & item ) const
|
||||
|
Reference in New Issue
Block a user