From 3d825e061318925b0b72c535d2b63ec5910829e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 22 Jan 2011 19:02:02 +0000 Subject: [PATCH] wxDataViewCtrl: fix autosized columns recalculation. The code and its assumptions were correct only for generic wxHeaderCtrl, it didn't work for MSW implementation. Fixed by updating all columns every time. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 2531bad861..45395280f2 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4325,8 +4325,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); } } -- 2.50.0