Revert "Autosize the right columns in macOS wxDataViewCtrl"

This reverts commit 36ea7ff4d6.
This commit is contained in:
Václav Slavík
2021-08-10 19:13:16 +02:00
parent 5f34d07bc1
commit 4d62a7a08f
2 changed files with 5 additions and 2 deletions

View File

@@ -2377,7 +2377,7 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos)
if ( pos == noOfColumns - 1 )
[m_OutlineView sizeLastColumnToFit];
else if ( GetColumn(pos)->GetWidthVariable() == wxCOL_WIDTH_AUTOSIZE )
else
[column setWidth:calculator.GetMaxWidth() + m_expanderWidth];
if ( !(GetDataViewCtrl()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) )

View File

@@ -302,6 +302,9 @@ void wxOSXDataViewModelNotifier::AdjustAutosizedColumns()
unsigned count = m_DataViewCtrlPtr->GetColumnCount();
for ( unsigned col = 0; col < count; col++ )
{
wxDataViewColumn *column = m_DataViewCtrlPtr->GetColumnPtr(col);
if ( column->GetWidthVariable() == wxCOL_WIDTH_AUTOSIZE )
m_DataViewCtrlPtr->GetDataViewPeer()->FitColumnWidthToContent(col);
}
}