Mac: Add wxDataViewCtrl::AdjustAutosizedColumns()
Refactor common code and also for upcoming accessibility from wxCocoaOutlineView. Part of #19003. Co-Authored-By: Dimitri Schoolwerth <dimitri@schoolwerth.com>
This commit is contained in:
parent
1324b5122b
commit
9a78bfb553
@ -261,6 +261,8 @@ public:
|
||||
m_Deleting = deleting;
|
||||
}
|
||||
|
||||
void AdjustAutosizedColumns() const;
|
||||
|
||||
virtual wxDataViewColumn *GetCurrentColumn() const wxOVERRIDE;
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE
|
||||
|
@ -506,9 +506,7 @@ int wxDataViewCtrl::GetColumnPosition(wxDataViewColumn const* columnPtr) const
|
||||
void wxDataViewCtrl::Collapse(wxDataViewItem const& item)
|
||||
{
|
||||
GetDataViewPeer()->Collapse(item);
|
||||
|
||||
if ( m_ModelNotifier )
|
||||
m_ModelNotifier->AdjustAutosizedColumns();
|
||||
AdjustAutosizedColumns();
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr)
|
||||
@ -523,9 +521,7 @@ void wxDataViewCtrl::EnsureVisible(wxDataViewItem const& item, wxDataViewColumn
|
||||
void wxDataViewCtrl::DoExpand(wxDataViewItem const& item, bool expandChildren)
|
||||
{
|
||||
GetDataViewPeer()->DoExpand(item, expandChildren);
|
||||
|
||||
if ( m_ModelNotifier )
|
||||
m_ModelNotifier->AdjustAutosizedColumns();
|
||||
AdjustAutosizedColumns();
|
||||
}
|
||||
|
||||
bool wxDataViewCtrl::IsExpanded( const wxDataViewItem & item ) const
|
||||
@ -701,6 +697,12 @@ void wxDataViewCtrl::FinishCustomItemEditing()
|
||||
}
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::AdjustAutosizedColumns() const
|
||||
{
|
||||
if ( m_ModelNotifier )
|
||||
m_ModelNotifier->AdjustAutosizedColumns();
|
||||
}
|
||||
|
||||
/*static*/
|
||||
wxVisualAttributes
|
||||
wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||
|
Loading…
Reference in New Issue
Block a user