X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/477243897abd3598dc4fdb81afd56cc03cfca00b..2fe212b0336512aac9eace69fab09ce856b0bf4b:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index c0a782866e..35d5d712b8 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1879,7 +1879,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) int numColumns = m_owner->GetColumnCount(); wxListItem item; - for (int i = 0; i < numColumns; i++) + for ( int i = 0; i < numColumns && x < w; i++ ) { m_owner->GetColumn( i, item ); int wCol = item.m_width; @@ -1923,11 +1923,9 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.DrawText( item.GetText(), x + EXTRA_WIDTH, HEADER_OFFSET_Y + EXTRA_HEIGHT ); - if ( x > w - wCol + 5 ) - break; - x += wCol; } + dc.EndDrawing(); } @@ -2648,7 +2646,7 @@ void wxListMainWindow::RefreshSelected() for ( size_t line = from; line <= to; line++ ) { - if ( IsHighlighted(line) ) + if ( IsHighlighted(line) || (line == m_current) ) { if ( line < selMin ) selMin = line; @@ -4904,7 +4902,7 @@ bool wxListCtrl::DeleteAllColumns() { size_t count = m_mainWin->m_columns.GetCount(); for ( size_t n = 0; n < count; n++ ) - DeleteColumn(n); + DeleteColumn(0); return TRUE; }