X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9293331c6e25901bd5f615c14950b5a75f2a27b..1cea736e035f7bf6dbe696d5e724cfdb17c35686:/src/generic/datavgen.cpp?ds=sidebyside diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 68c7d4bd09..d026036799 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -145,7 +145,6 @@ protected: return *(GetOwner()->GetColumn(idx)); } - // FIXME: currently unused virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle) { wxDataViewCtrl * const owner = GetOwner(); @@ -4238,7 +4237,7 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const calculator.UpdateWithRow(row); } - // row is the first unmeasured item now; that's out value of N/2 + // row is the first unmeasured item now; that's our value of N/2 if ( row < count ) { @@ -4278,8 +4277,6 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const const_cast(this)->m_colsBestWidths[idx] = max_width; return max_width; - - #undef MEASURE_ITEM } void wxDataViewCtrl::ColumnMoved(wxDataViewColumn * WXUNUSED(col), @@ -4327,8 +4324,9 @@ void wxDataViewCtrl::InvalidateColBestWidths() if ( m_headerArea ) { - // this updates visual appearance of columns 0 and up, not just 0 - m_headerArea->UpdateColumn(0); + const unsigned cols = m_headerArea->GetColumnCount(); + for ( unsigned i = 0; i < cols; i++ ) + m_headerArea->UpdateColumn(i); } }