diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index add0d06098..a03b3e8595 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2114,12 +2114,12 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) dataitem = wxDataViewItem( wxUIntToPtr(item+1) ); } - cell->PrepareForItem(model, dataitem, col->GetModelColumn()); - // update cell_rect cell_rect.y = GetLineStart( item ); cell_rect.height = GetLineHeight( item ); + cell->PrepareForItem(model, dataitem, col->GetModelColumn()); + // draw the background bool selected = m_selection.Index( item ) != wxNOT_FOUND; if ( !selected )