X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bde9072f68db1fed276e2ca376a1d95b4b8998d2..2baaf735f4e71ebb35b9938ca8bca917bc51a80b:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b3680c13d5..69f4d47a54 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; @@ -3393,16 +3391,16 @@ void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) ) // EVT_KILL_FOCUS before which means that we finish by redrawing the items // which are already drawn correctly resulting in horrible flicker - avoid // it - if ( m_hasFocus ) - return; + if ( !m_hasFocus ) + { + m_hasFocus = TRUE; - m_hasFocus = TRUE; + RefreshSelected(); + } - if (!GetParent()) + if ( !GetParent() ) return; - RefreshSelected(); - #ifdef __WXGTK__ g_focusWindow = GetParent(); #endif