Fix the issue with a last DVC column width on Mac

In Cocoa implementation of `wxDataViewControl`: call
`sizeLastColumnToFit` function of `NSTableView` in `OnSize` handler
(for any amount of columns, previously this function was called only
for a singe colunm DVCs).

`sizeLastColumnToFit` resizes the last column so the table view fits
exactly within its enclosing clip view.

This behavior is equivalent to `gtk` and `MSW` realizations.
This commit is contained in:
Ilya Sinitsyn
2019-05-03 23:10:16 +07:00
parent 542aafff39
commit 3a78de206a

View File

@@ -2564,8 +2564,7 @@ void wxCocoaDataViewControl::SetRowHeight(const wxDataViewItem& WXUNUSED(item),
void wxCocoaDataViewControl::OnSize()
{
if ([m_OutlineView numberOfColumns] == 1)
[m_OutlineView sizeLastColumnToFit];
[m_OutlineView sizeLastColumnToFit];
}
//